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 ·
dc24cab
1
Parent(s): f4e901c
Update README.md
Browse files
README.md
CHANGED
|
@@ -30,7 +30,7 @@ model-index:
|
|
| 30 |
metrics:
|
| 31 |
- type: acc_norm
|
| 32 |
name: normalized accuracy
|
| 33 |
-
value:
|
| 34 |
source:
|
| 35 |
name: Open LLM Leaderboard
|
| 36 |
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=HuggingFaceH4/zephyr-7b-beta
|
|
@@ -48,7 +48,7 @@ model-index:
|
|
| 48 |
metrics:
|
| 49 |
- type: acc_norm
|
| 50 |
name: normalized accuracy
|
| 51 |
-
value:
|
| 52 |
source:
|
| 53 |
name: Open LLM Leaderboard
|
| 54 |
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=HuggingFaceH4/zephyr-7b-beta
|
|
@@ -66,7 +66,7 @@ model-index:
|
|
| 66 |
metrics:
|
| 67 |
- type: f1
|
| 68 |
name: f1 score
|
| 69 |
-
value:
|
| 70 |
source:
|
| 71 |
name: Open LLM Leaderboard
|
| 72 |
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=HuggingFaceH4/zephyr-7b-beta
|
|
@@ -84,7 +84,7 @@ model-index:
|
|
| 84 |
num_few_shot: 0
|
| 85 |
metrics:
|
| 86 |
- type: mc2
|
| 87 |
-
value:
|
| 88 |
source:
|
| 89 |
name: Open LLM Leaderboard
|
| 90 |
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=HuggingFaceH4/zephyr-7b-beta
|
|
@@ -103,7 +103,7 @@ model-index:
|
|
| 103 |
metrics:
|
| 104 |
- type: acc
|
| 105 |
name: accuracy
|
| 106 |
-
value:
|
| 107 |
source:
|
| 108 |
name: Open LLM Leaderboard
|
| 109 |
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=HuggingFaceH4/zephyr-7b-beta
|
|
@@ -122,7 +122,7 @@ model-index:
|
|
| 122 |
metrics:
|
| 123 |
- type: acc
|
| 124 |
name: accuracy
|
| 125 |
-
value:
|
| 126 |
source:
|
| 127 |
name: Open LLM Leaderboard
|
| 128 |
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=HuggingFaceH4/zephyr-7b-beta
|
|
@@ -141,7 +141,7 @@ model-index:
|
|
| 141 |
metrics:
|
| 142 |
- type: acc
|
| 143 |
name: accuracy
|
| 144 |
-
value:
|
| 145 |
source:
|
| 146 |
name: Open LLM Leaderboard
|
| 147 |
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=HuggingFaceH4/zephyr-7b-beta
|
|
|
|
| 30 |
metrics:
|
| 31 |
- type: acc_norm
|
| 32 |
name: normalized accuracy
|
| 33 |
+
value: 62.03071672354948
|
| 34 |
source:
|
| 35 |
name: Open LLM Leaderboard
|
| 36 |
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=HuggingFaceH4/zephyr-7b-beta
|
|
|
|
| 48 |
metrics:
|
| 49 |
- type: acc_norm
|
| 50 |
name: normalized accuracy
|
| 51 |
+
value: 84.35570603465445
|
| 52 |
source:
|
| 53 |
name: Open LLM Leaderboard
|
| 54 |
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=HuggingFaceH4/zephyr-7b-beta
|
|
|
|
| 66 |
metrics:
|
| 67 |
- type: f1
|
| 68 |
name: f1 score
|
| 69 |
+
value: 9.662437080536909
|
| 70 |
source:
|
| 71 |
name: Open LLM Leaderboard
|
| 72 |
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=HuggingFaceH4/zephyr-7b-beta
|
|
|
|
| 84 |
num_few_shot: 0
|
| 85 |
metrics:
|
| 86 |
- type: mc2
|
| 87 |
+
value: 57.44916942762855
|
| 88 |
source:
|
| 89 |
name: Open LLM Leaderboard
|
| 90 |
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=HuggingFaceH4/zephyr-7b-beta
|
|
|
|
| 103 |
metrics:
|
| 104 |
- type: acc
|
| 105 |
name: accuracy
|
| 106 |
+
value: 12.736921910538287
|
| 107 |
source:
|
| 108 |
name: Open LLM Leaderboard
|
| 109 |
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=HuggingFaceH4/zephyr-7b-beta
|
|
|
|
| 122 |
metrics:
|
| 123 |
- type: acc
|
| 124 |
name: accuracy
|
| 125 |
+
value: 61.07
|
| 126 |
source:
|
| 127 |
name: Open LLM Leaderboard
|
| 128 |
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=HuggingFaceH4/zephyr-7b-beta
|
|
|
|
| 141 |
metrics:
|
| 142 |
- type: acc
|
| 143 |
name: accuracy
|
| 144 |
+
value: 77.74269928966061
|
| 145 |
source:
|
| 146 |
name: Open LLM Leaderboard
|
| 147 |
url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=HuggingFaceH4/zephyr-7b-beta
|