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