Text Generation
Transformers
TensorBoard
Safetensors
mistral
Generated from Trainer
conversational
text-generation-inference
Instructions to use hllj/sft-zephyr-7b-beta-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hllj/sft-zephyr-7b-beta-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="hllj/sft-zephyr-7b-beta-v1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("hllj/sft-zephyr-7b-beta-v1") model = AutoModelForCausalLM.from_pretrained("hllj/sft-zephyr-7b-beta-v1", 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use hllj/sft-zephyr-7b-beta-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hllj/sft-zephyr-7b-beta-v1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hllj/sft-zephyr-7b-beta-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/hllj/sft-zephyr-7b-beta-v1
- SGLang
How to use hllj/sft-zephyr-7b-beta-v1 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 "hllj/sft-zephyr-7b-beta-v1" \ --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": "hllj/sft-zephyr-7b-beta-v1", "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 "hllj/sft-zephyr-7b-beta-v1" \ --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": "hllj/sft-zephyr-7b-beta-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use hllj/sft-zephyr-7b-beta-v1 with Docker Model Runner:
docker model run hf.co/hllj/sft-zephyr-7b-beta-v1
sft-zephyr-7b-beta-v1
This model is a fine-tuned version of HuggingFaceH4/zephyr-7b-beta on the None dataset. It achieves the following results on the evaluation set:
- Loss: 0.4927
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 3e-05
- train_batch_size: 4
- eval_batch_size: 4
- seed: 42
- distributed_type: multi-GPU
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine
- lr_scheduler_warmup_ratio: 0.05
- training_steps: 1000
- mixed_precision_training: Native AMP
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 1.0538 | 0.19 | 50 | 1.1364 |
| 0.7744 | 0.37 | 100 | 0.7777 |
| 0.5936 | 0.56 | 150 | 0.6507 |
| 0.5449 | 0.74 | 200 | 0.6087 |
| 0.501 | 0.93 | 250 | 0.5840 |
| 0.5752 | 1.12 | 300 | 0.5552 |
| 0.4542 | 1.3 | 350 | 0.5419 |
| 0.5115 | 1.49 | 400 | 0.5243 |
| 0.4224 | 1.67 | 450 | 0.5188 |
| 0.4486 | 1.86 | 500 | 0.5055 |
| 0.3865 | 2.04 | 550 | 0.5038 |
| 0.4193 | 2.23 | 600 | 0.5048 |
| 0.4294 | 2.42 | 650 | 0.4995 |
| 0.4077 | 2.6 | 700 | 0.5014 |
| 0.4667 | 2.79 | 750 | 0.4985 |
| 0.4226 | 2.97 | 800 | 0.4937 |
| 0.4195 | 3.16 | 850 | 0.4920 |
| 0.338 | 3.35 | 900 | 0.4923 |
| 0.3943 | 3.53 | 950 | 0.4926 |
| 0.3953 | 3.72 | 1000 | 0.4927 |
Framework versions
- Transformers 4.35.2
- Pytorch 2.1.0
- Datasets 2.15.0
- Tokenizers 0.15.0
- Downloads last month
- 17
Model tree for hllj/sft-zephyr-7b-beta-v1
Base model
mistralai/Mistral-7B-v0.1 Finetuned
HuggingFaceH4/zephyr-7b-beta