stablelm-zephyr-3b / README.md
pvduy's picture
Update README.md
08e8d88
|
raw
history blame
No virus
4.7 kB
metadata
datasets:
  - HuggingFaceH4/ultrachat_200k
  - HuggingFaceH4/ultrafeedback_binarized
  - meta-math/MetaMathQA
  - WizardLM/WizardLM_evol_instruct_V2_196k
language:
  - en
tags:
  - causal-lm
extra_gated_fields:
  Name: text
  Email: text
  Country: text
  Organization or Affiliation: text
  I ALLOW Stability AI to email me about new model releases: checkbox

Stable Zephyr 3B

Model Description

Stable Zephyr 3B is a 3 billion parameter instruction tuned inspired by HugginFaceH4's Zephyr 7B training pipeline this model was trained on a mix of publicly available datasets, synthetic datasets using Direct Preference Optimization (DPO), evaluation for this model based on MT Bench and Alpaca Benchmark

Usage

Get started generating text with Stable Zephyr 3B by using the following code snippet:

from transformers import AutoModelForCausalLM, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("stabilityai/stable-zephyr-3b-dpo")
model = AutoModelForCausalLM.from_pretrained(
  "stabilityai/stable-zephyr-3b-dpo",
  trust_remote_code=True,
  torch_dtype="auto",
)
model.cuda()
prompt = "<|user|>\nIn the field of quantum physics, what is superposition, and how does it relate to the phenomenon of quantum entanglement?<|endoftext|>\n<|assistant|>\n"
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
tokens = model.generate(
  **inputs,
  max_new_tokens=1024,
  temperature=0.7,
  top_p=0.95,
  do_sample=True,
)
print(tokenizer.decode(tokens[0], skip_special_tokens=True))

Model Details

  • Developed by: Stability AI
  • Model type: Stable Zephyr 3B models are auto-regressive language models based on the transformer decoder architecture.
  • Language(s): English
  • Library: Alignment Handbook
  • Finetuned from model: stabilityai/stablelm-3b-4e1t
  • License: TBD
  • Contact: For questions and comments about the model, please email lm@stability.ai

Training Dataset

The dataset is comprised of a mixture of open datasets large-scale datasets available on the HuggingFace Hub:

  • HuggingFaceH4/ultrachat_200k
  • HuggingFaceH4/ultrafeedback_binarized
  • meta-math/MetaMathQA
  • Capybara
  • Instruct Code Dataset (Internal)
  • Wizard Dataset

Training Procedure

Performance

image/png

Model Size Alignment MT-Bench (score) AlpacaEval (win rate %)
Stable Zephyr 3B 🪁 3B DPO 6.86 75.19
Stable Zephyr (SFT only) 3B SFT 7.12 71.15
MPT-Chat 7B dSFT 5.42 -
Xwin-LMv0.1 7B dPPO 6.19 87.83
Mistral-Instructv0.1 7B - 6.84 -
Zephyr-7b-α 7B dDPO 6.88 -
Zephyr-7b-β 7B dDPO 7.34 90.60
Falcon-Instruct 40B dSFT 5.17 45.71
Guanaco 65B SFT 6.41 71.80
Llama2-Chat 70B RLHF 6.86 92.66
Vicuna v1.3 33B dSFT 7.12 88.99
WizardLM v1.0 70B dSFT 7.71 -
Xwin-LM v0.1 70B dPPO - 95.57
GPT-3.5-turbo - RLHF 7.94 89.37
Claude 2 - RLHF 8.06 91.36
GPT-4 - RLHF 8.99 95.28

Training Infrastructure

  • Hardware: Stable Zephyr 3B was trained on the Stability AI cluster across 8 nodes with 8 A100 80GBs GPUs for each nodes.
  • Code Base: We use our internal script for SFT steps and used HuggingFace Alignment Handbook script for DPO training.

Use and Limitations

Intended Use

The model is intended to be used as a foundational base model for application-specific fine-tuning. Developers must evaluate and fine-tune the model for safe performance in downstream applications.

Limitations and Bias

​ As a base model, this model may exhibit unreliable, unsafe, or other undesirable behaviors that must be corrected through evaluation and fine-tuning prior to deployment. The pre-training dataset may have contained offensive or inappropriate content, even after applying data cleansing filters, which can be reflected in the model-generated text. We recommend that users exercise caution when using these models in production systems. Do not use the models if they are unsuitable for your application, or for any applications that may cause deliberate or unintentional harm to others.