stablelm-zephyr-3b / README.md
ncoop57's picture
Update README.md
e3d1186
|
raw
history blame
4.93 kB
metadata
license: cc-by-sa-4.0
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

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

At the time of release, Zephyr-7B-β is the highest ranked 7B chat model on the MT-Bench and AlpacaEval benchmarks:

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.