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)# pip install -U transformers accelerate # 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=256) 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 History
-
Update README.md
3373c17 -
Update README.md
a044a6c -
Update README.md
5ae4839
-
Update README.md
72ac185 -
Update README.md
a14ed68 -
[WIP] Add evaluation results to model card metadata
This is a work in progress. The goal is to list evaluation results in the model card metadata, especially the results from the Open LLM Leaderboard. This PR has **not** been created automatically. #### Pending questions: 1. Should we report all metrics for each task? (especially the `_stderr` ones?) Or only the one that is displayed in the LLM Leaderboard? 2. Are the dataset `type`/`name`/`config`/`split`/`num_few_shot` accurate in the suggested changes? 3. How to report the MMLU results? There are 57 different `hendrycksTest` datasets for a total of 228 metrics? 😵 4. How to report MT-Bench results? (asking since they are reported in the model card but not in the metadata) 5. How to report AlpacaEval results? (asking since they are reported in the model card but not in the metadata) Related thread: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard/discussions/370#65663f60589e212284db2ffc. Related PR in the Hub docs: https://github.com/huggingface/hub-docs/pull/1144. …6581330
-
Add widget example (#34)
- Add widget example (8167fa42e1d5a4581a8750174d0226e534b5a495) - Update README.md (2ea4a25f5f8c309d0905b38779efc8b9e9230814)8d44a71
-
Update README.md
36db76e
-
Adding Evaluation Results (#31)
- Adding Evaluation Results (5c15b90755bfd112775ed6136ba2840e7d34c1d5) Co-authored-by: Open LLM Leaderboard PR Bot <leaderboard-pr-bot@users.noreply.huggingface.co>c2339b6 -
Update README.md (#28)
- Update README.md (70788fbbbdcedb5bc7f309548eceef33fb3b02e6) Co-authored-by: Nathan Lambert <natolambert@users.noreply.huggingface.co>abe3655
-
Upload MistralForCausalLM (#20)
- Upload MistralForCausalLM (0a8db1951635618c17d8be5a6cb850b62dec4446)8af01af
-
Update README.md (#1)
- Update README.md (f189b7cd37b6e7b0dbb175487613d106dffa4722) Co-authored-by: Leandro von Werra <lvwerra@users.noreply.huggingface.co>3bac358 -
Update README.md
af28f1d -
Update README.md
99dc9c4
-
Update README.md
8d4f1f7 -
Update README.md
0f4b871 -
Update README.md
e981ffb -
Update config.json
e323593 -
Delete dialogue_template.json
fff0b6c -
Update README.md
63bc8ee -
Update README.md
8bf7bff -
Duplicate from HuggingFaceH4-colab/zephyr-7b-beta-sharded
97ecdb4