Text Generation
Transformers
TensorBoard
Safetensors
gemma
alignment-handbook
trl
dpo
Generated from Trainer
conversational
text-generation-inference
Instructions to use chrlu/zephyr-7b-gemma-hinge with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use chrlu/zephyr-7b-gemma-hinge with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="chrlu/zephyr-7b-gemma-hinge") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("chrlu/zephyr-7b-gemma-hinge") model = AutoModelForCausalLM.from_pretrained("chrlu/zephyr-7b-gemma-hinge") 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 chrlu/zephyr-7b-gemma-hinge with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "chrlu/zephyr-7b-gemma-hinge" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "chrlu/zephyr-7b-gemma-hinge", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/chrlu/zephyr-7b-gemma-hinge
- SGLang
How to use chrlu/zephyr-7b-gemma-hinge 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 "chrlu/zephyr-7b-gemma-hinge" \ --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": "chrlu/zephyr-7b-gemma-hinge", "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 "chrlu/zephyr-7b-gemma-hinge" \ --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": "chrlu/zephyr-7b-gemma-hinge", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use chrlu/zephyr-7b-gemma-hinge with Docker Model Runner:
docker model run hf.co/chrlu/zephyr-7b-gemma-hinge
End of training
Browse files- README.md +16 -10
- all_results.json +13 -0
- config.json +1 -1
- eval_results.json +16 -0
- runs/Apr27_16-40-45_660111d13776/events.out.tfevents.1714235380.660111d13776.64926.1 +3 -0
README.md
CHANGED
|
@@ -2,9 +2,15 @@
|
|
| 2 |
license: other
|
| 3 |
base_model: HuggingFaceH4/zephyr-7b-gemma-sft-v0.1
|
| 4 |
tags:
|
|
|
|
| 5 |
- trl
|
| 6 |
- dpo
|
| 7 |
- generated_from_trainer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
model-index:
|
| 9 |
- name: zephyr-7b-gemma-hinge
|
| 10 |
results: []
|
|
@@ -15,17 +21,17 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 15 |
|
| 16 |
# zephyr-7b-gemma-hinge
|
| 17 |
|
| 18 |
-
This model is a fine-tuned version of [HuggingFaceH4/zephyr-7b-gemma-sft-v0.1](https://huggingface.co/HuggingFaceH4/zephyr-7b-gemma-sft-v0.1) on
|
| 19 |
It achieves the following results on the evaluation set:
|
| 20 |
-
- Loss: 0.
|
| 21 |
-
- Rewards/chosen: -2.
|
| 22 |
-
- Rewards/rejected: -3.
|
| 23 |
-
- Rewards/accuracies: 0.
|
| 24 |
-
- Rewards/margins: 1.
|
| 25 |
-
- Logps/rejected: -
|
| 26 |
-
- Logps/chosen: -416.
|
| 27 |
-
- Logits/rejected:
|
| 28 |
-
- Logits/chosen: 101.
|
| 29 |
|
| 30 |
## Model description
|
| 31 |
|
|
|
|
| 2 |
license: other
|
| 3 |
base_model: HuggingFaceH4/zephyr-7b-gemma-sft-v0.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 |
+
- argilla/dpo-mix-7k
|
| 14 |
model-index:
|
| 15 |
- name: zephyr-7b-gemma-hinge
|
| 16 |
results: []
|
|
|
|
| 21 |
|
| 22 |
# zephyr-7b-gemma-hinge
|
| 23 |
|
| 24 |
+
This model is a fine-tuned version of [HuggingFaceH4/zephyr-7b-gemma-sft-v0.1](https://huggingface.co/HuggingFaceH4/zephyr-7b-gemma-sft-v0.1) on the argilla/dpo-mix-7k dataset.
|
| 25 |
It achieves the following results on the evaluation set:
|
| 26 |
+
- Loss: 0.5273
|
| 27 |
+
- Rewards/chosen: -2.6335
|
| 28 |
+
- Rewards/rejected: -3.8935
|
| 29 |
+
- Rewards/accuracies: 0.7292
|
| 30 |
+
- Rewards/margins: 1.2600
|
| 31 |
+
- Logps/rejected: -439.9419
|
| 32 |
+
- Logps/chosen: -416.3391
|
| 33 |
+
- Logits/rejected: 96.0524
|
| 34 |
+
- Logits/chosen: 101.8806
|
| 35 |
|
| 36 |
## Model description
|
| 37 |
|
all_results.json
CHANGED
|
@@ -1,5 +1,18 @@
|
|
| 1 |
{
|
| 2 |
"epoch": 1.971563981042654,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
"total_flos": 0.0,
|
| 4 |
"train_loss": 0.4740314678503917,
|
| 5 |
"train_runtime": 2291.7376,
|
|
|
|
| 1 |
{
|
| 2 |
"epoch": 1.971563981042654,
|
| 3 |
+
"eval_logits/chosen": 101.8805923461914,
|
| 4 |
+
"eval_logits/rejected": 96.05239868164062,
|
| 5 |
+
"eval_logps/chosen": -416.339111328125,
|
| 6 |
+
"eval_logps/rejected": -439.9419250488281,
|
| 7 |
+
"eval_loss": 0.5273366570472717,
|
| 8 |
+
"eval_rewards/accuracies": 0.7291666865348816,
|
| 9 |
+
"eval_rewards/chosen": -2.633545160293579,
|
| 10 |
+
"eval_rewards/margins": 1.2600029706954956,
|
| 11 |
+
"eval_rewards/rejected": -3.893548011779785,
|
| 12 |
+
"eval_runtime": 119.4302,
|
| 13 |
+
"eval_samples": 750,
|
| 14 |
+
"eval_samples_per_second": 6.28,
|
| 15 |
+
"eval_steps_per_second": 0.201,
|
| 16 |
"total_flos": 0.0,
|
| 17 |
"train_loss": 0.4740314678503917,
|
| 18 |
"train_runtime": 2291.7376,
|
config.json
CHANGED
|
@@ -24,6 +24,6 @@
|
|
| 24 |
"rope_theta": 10000.0,
|
| 25 |
"torch_dtype": "bfloat16",
|
| 26 |
"transformers_version": "4.40.1",
|
| 27 |
-
"use_cache":
|
| 28 |
"vocab_size": 256000
|
| 29 |
}
|
|
|
|
| 24 |
"rope_theta": 10000.0,
|
| 25 |
"torch_dtype": "bfloat16",
|
| 26 |
"transformers_version": "4.40.1",
|
| 27 |
+
"use_cache": true,
|
| 28 |
"vocab_size": 256000
|
| 29 |
}
|
eval_results.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"epoch": 1.971563981042654,
|
| 3 |
+
"eval_logits/chosen": 101.8805923461914,
|
| 4 |
+
"eval_logits/rejected": 96.05239868164062,
|
| 5 |
+
"eval_logps/chosen": -416.339111328125,
|
| 6 |
+
"eval_logps/rejected": -439.9419250488281,
|
| 7 |
+
"eval_loss": 0.5273366570472717,
|
| 8 |
+
"eval_rewards/accuracies": 0.7291666865348816,
|
| 9 |
+
"eval_rewards/chosen": -2.633545160293579,
|
| 10 |
+
"eval_rewards/margins": 1.2600029706954956,
|
| 11 |
+
"eval_rewards/rejected": -3.893548011779785,
|
| 12 |
+
"eval_runtime": 119.4302,
|
| 13 |
+
"eval_samples": 750,
|
| 14 |
+
"eval_samples_per_second": 6.28,
|
| 15 |
+
"eval_steps_per_second": 0.201
|
| 16 |
+
}
|
runs/Apr27_16-40-45_660111d13776/events.out.tfevents.1714235380.660111d13776.64926.1
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fc4c27d471cbe44ac67012d3908d4834b0c7903b252e1669e73c263f5322827b
|
| 3 |
+
size 815
|