Text Generation
Transformers
PyTorch
Safetensors
English
mistral
Generated from Trainer
conversational
Eval Results (legacy)
Eval Results
text-generation-inference
Instructions to use HuggingFaceH4/zephyr-7b-beta with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HuggingFaceH4/zephyr-7b-beta with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="HuggingFaceH4/zephyr-7b-beta") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("HuggingFaceH4/zephyr-7b-beta") model = AutoModelForCausalLM.from_pretrained("HuggingFaceH4/zephyr-7b-beta", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use HuggingFaceH4/zephyr-7b-beta with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HuggingFaceH4/zephyr-7b-beta" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HuggingFaceH4/zephyr-7b-beta", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/HuggingFaceH4/zephyr-7b-beta
- SGLang
How to use HuggingFaceH4/zephyr-7b-beta with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "HuggingFaceH4/zephyr-7b-beta" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HuggingFaceH4/zephyr-7b-beta", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "HuggingFaceH4/zephyr-7b-beta" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HuggingFaceH4/zephyr-7b-beta", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use HuggingFaceH4/zephyr-7b-beta with Docker Model Runner:
docker model run hf.co/HuggingFaceH4/zephyr-7b-beta
Commit ·
63bc8ee
1
Parent(s): 8bf7bff
Update README.md
Browse files
README.md
CHANGED
|
@@ -37,6 +37,28 @@ Zephyr is a series of language models that are trained to act as helpful assista
|
|
| 37 |
- **Repository:** https://github.com/huggingface/alignment-handbook
|
| 38 |
- **Demo:** https://huggingface.co/spaces/HuggingFaceH4/zephyr-chat
|
| 39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
## Intended uses & limitations
|
| 41 |
|
| 42 |
The model was initially fine-tuned on a filtered and preprocessed of the [`UltraChat`](https://huggingface.co/datasets/stingning/ultrachat) dataset, which contains a diverse range of synthetic dialogues generated by ChatGPT.
|
|
|
|
| 37 |
- **Repository:** https://github.com/huggingface/alignment-handbook
|
| 38 |
- **Demo:** https://huggingface.co/spaces/HuggingFaceH4/zephyr-chat
|
| 39 |
|
| 40 |
+
## Performance
|
| 41 |
+
|
| 42 |
+

|
| 43 |
+
|
| 44 |
+
| Model | Size | Align | MT-Bench (score) | AlpacaEval (win %) |
|
| 45 |
+
|-------------|-----|----|---------------|--------------|
|
| 46 |
+
| StableLM-Tuned-α | 7B| dSFT |2.75| -|
|
| 47 |
+
| MPT-Chat | 7B |dSFT |5.42| -|
|
| 48 |
+
| Xwin-LMv0.1 | 7B| dPPO| 6.19| 87.83|
|
| 49 |
+
| Mistral-Instructv0.1 | 7B| - | 6.84 |-|
|
| 50 |
+
| Zephyr-7b-α |7B| dDPO| 6.88| -|
|
| 51 |
+
| **Zephyr-7b-β** |7B| dDPO| 7.34| 90.60|
|
| 52 |
+
| Falcon-Instruct | 40B |dSFT |5.17 |45.71|
|
| 53 |
+
| Guanaco 65B | SFT |6.41| 71.80|
|
| 54 |
+
| Llama2-Chat | 70B |RLHF |6.86| 92.66|
|
| 55 |
+
| Vicuna v1.3 | 33B |dSFT |7.12 |88.99|
|
| 56 |
+
| WizardLM v1.0 | 70B |dSFT |7.71 |-|
|
| 57 |
+
| Xwin-LM v0.1 | 70B |dPPO |- |95.57|
|
| 58 |
+
| GPT-3.5-turbo | - |RLHF |7.94 |89.37|
|
| 59 |
+
| Claude 2 | - |RLHF |8.06| 91.36|
|
| 60 |
+
| GPT-4 | -| RLHF |8.99| 95.28|
|
| 61 |
+
|
| 62 |
## Intended uses & limitations
|
| 63 |
|
| 64 |
The model was initially fine-tuned on a filtered and preprocessed of the [`UltraChat`](https://huggingface.co/datasets/stingning/ultrachat) dataset, which contains a diverse range of synthetic dialogues generated by ChatGPT.
|