Text Generation
Transformers
TensorBoard
Safetensors
mistral
alignment-handbook
Generated from Trainer
trl
sft
conversational
text-generation-inference
Instructions to use dlibf/zephyr-7b-sft-math_code with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dlibf/zephyr-7b-sft-math_code with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dlibf/zephyr-7b-sft-math_code") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("dlibf/zephyr-7b-sft-math_code") model = AutoModelForCausalLM.from_pretrained("dlibf/zephyr-7b-sft-math_code") 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
- vLLM
How to use dlibf/zephyr-7b-sft-math_code with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dlibf/zephyr-7b-sft-math_code" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dlibf/zephyr-7b-sft-math_code", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/dlibf/zephyr-7b-sft-math_code
- SGLang
How to use dlibf/zephyr-7b-sft-math_code 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 "dlibf/zephyr-7b-sft-math_code" \ --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": "dlibf/zephyr-7b-sft-math_code", "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 "dlibf/zephyr-7b-sft-math_code" \ --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": "dlibf/zephyr-7b-sft-math_code", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use dlibf/zephyr-7b-sft-math_code with Docker Model Runner:
docker model run hf.co/dlibf/zephyr-7b-sft-math_code
End of training
Browse files- README.md +6 -2
- config.json +1 -1
README.md
CHANGED
|
@@ -2,11 +2,15 @@
|
|
| 2 |
license: apache-2.0
|
| 3 |
base_model: mistralai/Mistral-7B-v0.1
|
| 4 |
tags:
|
|
|
|
|
|
|
| 5 |
- trl
|
| 6 |
- sft
|
| 7 |
- generated_from_trainer
|
| 8 |
datasets:
|
| 9 |
-
-
|
|
|
|
|
|
|
| 10 |
model-index:
|
| 11 |
- name: zephyr-7b-sft-math_code
|
| 12 |
results: []
|
|
@@ -17,7 +21,7 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 17 |
|
| 18 |
# zephyr-7b-sft-math_code
|
| 19 |
|
| 20 |
-
This model is a fine-tuned version of [mistralai/Mistral-7B-v0.1](https://huggingface.co/mistralai/Mistral-7B-v0.1) on the
|
| 21 |
It achieves the following results on the evaluation set:
|
| 22 |
- Loss: 0.9659
|
| 23 |
|
|
|
|
| 2 |
license: apache-2.0
|
| 3 |
base_model: mistralai/Mistral-7B-v0.1
|
| 4 |
tags:
|
| 5 |
+
- alignment-handbook
|
| 6 |
+
- generated_from_trainer
|
| 7 |
- trl
|
| 8 |
- sft
|
| 9 |
- generated_from_trainer
|
| 10 |
datasets:
|
| 11 |
+
- HuggingFaceH4/ultrachat_200k
|
| 12 |
+
- dlibf/glaive-code-assistant
|
| 13 |
+
- dlibf/metamathqa_formatted
|
| 14 |
model-index:
|
| 15 |
- name: zephyr-7b-sft-math_code
|
| 16 |
results: []
|
|
|
|
| 21 |
|
| 22 |
# zephyr-7b-sft-math_code
|
| 23 |
|
| 24 |
+
This model is a fine-tuned version of [mistralai/Mistral-7B-v0.1](https://huggingface.co/mistralai/Mistral-7B-v0.1) on the HuggingFaceH4/ultrachat_200k, the dlibf/glaive-code-assistant and the dlibf/metamathqa_formatted datasets.
|
| 25 |
It achieves the following results on the evaluation set:
|
| 26 |
- Loss: 0.9659
|
| 27 |
|
config.json
CHANGED
|
@@ -21,6 +21,6 @@
|
|
| 21 |
"tie_word_embeddings": false,
|
| 22 |
"torch_dtype": "bfloat16",
|
| 23 |
"transformers_version": "4.36.2",
|
| 24 |
-
"use_cache":
|
| 25 |
"vocab_size": 32000
|
| 26 |
}
|
|
|
|
| 21 |
"tie_word_embeddings": false,
|
| 22 |
"torch_dtype": "bfloat16",
|
| 23 |
"transformers_version": "4.36.2",
|
| 24 |
+
"use_cache": true,
|
| 25 |
"vocab_size": 32000
|
| 26 |
}
|