Text Generation
Transformers
PyTorch
Safetensors
English
mistral
Generated from Trainer
conversational
Eval Results (legacy)
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") 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
- 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
Install & run HuggingFaceH4/zephyr-7b-beta easily using llmpm
#76 opened 2 months ago
by
sarthak-saxena
Update README.md
#75 opened 7 months ago
by
peterpeter8585
Trying to 'Use this model', getting: ' The requested model 'HuggingFaceH4/zephyr-7b-beta' is not supported by any provider you have enabled'
๐ 1
1
#74 opened 9 months ago
by
OnurKerimoglu
For restart endpoint
โ 1
#73 opened 11 months ago
by
anant5552
Model's End Point paused
4
#72 opened 11 months ago
by
stark0p
Potential Inconsistencies Model and Base Model License
#71 opened 12 months ago
by
yueyangchen
function calling
#69 opened about 1 year ago
by
jeeltcraft
Zephyr maximum token limit
#68 opened about 1 year ago
by
animesh1998
Getting NULL response using curl or PHP
#67 opened over 1 year ago
by
ajmerphull
Adding Evaluation Results
#66 opened over 1 year ago
by
f0rGoTTen000
Update README.md
#65 opened over 1 year ago
by
karrrr123456
Some no safe political output for China mainland network use.
#64 opened over 1 year ago
by
Sakura12546
My_duplictemodel
#63 opened almost 2 years ago
by
leolaish
Model is not generating an answer or it takes a really long time
1
#62 opened about 2 years ago
by
polycaman
Update README.md
#61 opened about 2 years ago
by
MasonDixon2711
๐ฉStill receiving 'Fetch Failed' Error
2
#60 opened about 2 years ago
by
Johnbigginsman
๐ฉ Report: Chat Not Working
๐๐ 6
4
#59 opened about 2 years ago
by
redformurder
Internal Server Error
#58 opened about 2 years ago
by
Rhea0000
Demo different from API
1
#57 opened about 2 years ago
by
businesspig1
Nodejs?Nextjs streaming
#56 opened about 2 years ago
by
dreyyy
Zephyr is off
#55 opened about 2 years ago
by
yinbtologie
System prompts and settings from HF's Zephyr 7b-beta?
1
#53 opened over 2 years ago
by
ParanoidPosition
Truncating Response
๐ค 1
2
#52 opened over 2 years ago
by
Mostafaadel174
getting CUDA out of memory
5
#51 opened over 2 years ago
by
allpunks
Weird Responses?
#50 opened over 2 years ago
by
TheAGames10
zephyr-7b-beta with VLLM
1
#49 opened over 2 years ago
by
D3v
100k is converted into $100,00
#48 opened over 2 years ago
by
wehapi
response is weird
1
#47 opened over 2 years ago
by
wehapi
Taking way to long to generate a response
โค๏ธ๐ 4
2
#46 opened over 2 years ago
by
Idkkitsune
Answering in Spanish
2
#45 opened over 2 years ago
by
whoami02
Update Ruined Inference
#44 opened over 2 years ago
by
orick96
Error Message when the number of input tokens exceeds 2000. I am using ml.g4dn.8xlarge instance (128 GiB).
#43 opened over 2 years ago
by
YWDallas
What EC2 configuration/instance should I use?
#41 opened over 2 years ago
by
rikomi7571
Zephyr hallucinations with conversational memory
2
#39 opened over 2 years ago
by
lfoppiano
Context length?
2
#38 opened over 2 years ago
by
austinmw
[AUTOMATED] Model Memory Requirements
โค๏ธ 1
#37 opened over 2 years ago
by
model-sizer-bot
What's the difference between zephyr-7b-beta and zephyr-7b-alpha?
1
#36 opened over 2 years ago
by
haha-point
[AUTOMATED] Model Memory Requirements
3
#35 opened over 2 years ago
by
model-sizer-bot
Can zephyr-7b support YARN 128K context window ?
๐ 3
#33 opened over 2 years ago
by
tim9510019
Why isn't the `model_max_length` set to 2048?
1
#32 opened over 2 years ago
by
alvarobartt
Did the LoRa finetuned model end up performing the same compared to full-finetuning?
1
#30 opened over 2 years ago
by
timlim123
How do I achieve streaming output
2
#29 opened over 2 years ago
by
wengnews
BFloat16 is not supported on MPS
2
#27 opened over 2 years ago
by
mhelmy
Optimize Response Length and Quality
๐ 1
#26 opened over 2 years ago
by
stargazer09
Add widget examples
#25 opened over 2 years ago
by
mishig
Understand reward metrics
๐ 1
1
#22 opened over 2 years ago
by
NhatHoang2002
Question on License given use of Ultrachat
๐ 1
1
#21 opened over 2 years ago
by
RonanMcGovern
Very Nice Work, But It Can't Be Prompted To Tell Stories
#19 opened over 2 years ago
by deleted