Text Generation
Transformers
Safetensors
English
mistral
unsloth
zephyr
sft
conversational
text-generation-inference
Instructions to use unsloth/zephyr-sft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use unsloth/zephyr-sft with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="unsloth/zephyr-sft") 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("unsloth/zephyr-sft") model = AutoModelForCausalLM.from_pretrained("unsloth/zephyr-sft", 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use unsloth/zephyr-sft with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "unsloth/zephyr-sft" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "unsloth/zephyr-sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/unsloth/zephyr-sft
- SGLang
How to use unsloth/zephyr-sft 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 "unsloth/zephyr-sft" \ --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": "unsloth/zephyr-sft", "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 "unsloth/zephyr-sft" \ --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": "unsloth/zephyr-sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use unsloth/zephyr-sft with Docker Model Runner:
docker model run hf.co/unsloth/zephyr-sft
Commit History
-
Upload tokenizer
Verified signature88e2382 -
Upload config
Verified signatureae3737e -
Upload config
Verified signaturee0844ab
-
Upload tokenizer
Verified signaturef553ff4 -
Upload config
Verified signature8b76713 -
Upload config
Verified signaturea32acff
-
Upload tokenizer
Verified signaturef9ea766 -
Upload config
Verified signature8eb850e -
Upload config
Verified signature3198d51
-
Upload tokenizer
Verified signaturee2af921 -
Upload config
Verified signature7ea535c -
Upload config
Verified signaturebf4eaae
-
Upload tokenizer
Verified signature66fb144 -
Upload config
Verified signature5cf39f5 -
Upload config
Verified signature12736c5
-
Upload tokenizer
Verified signature98af0ad -
Upload config
Verified signature5512ad7 -
Upload config
Verified signature787a628
-
Upload tokenizer
Verified signatured9cb8c7 -
Upload config
Verified signatureecd9694 -
Upload config
Verified signature735bebf
-
Upload tokenizer
Verified signature367a1d7 -
Upload config
Verified signature05fe76d -
Upload config
Verified signature891316e -
Upload tokenizer
Verified signaturea52836f -
Upload config
Verified signaturec8267ab -
Upload config
Verified signature20be923 -
Upload tokenizer
Verified signaturefa3b9db -
Upload config
Verified signature5aa663d -
Upload config
Verified signatureca9766e -
Upload MistralForCausalLM
Verified signature4b04a63 -
Upload tokenizer
Verified signature8dee568 -
Upload config
Verified signature09d417d -
Upload config
Verified signature92a21d6
-
Update README.md
Verified signature4f7464e -
Update README.md
Verified signature90d7e66
-
Create README.md
Verified signature9d4636a
-
Upload tokenizer
d273c6f -
Upload MistralForCausalLM
204ba03 -
initial commit
b31690e