Text Generation
Transformers
TensorBoard
Safetensors
qwen2
alignment-handbook
trl
dpo
Generated from Trainer
conversational
text-generation-inference
Instructions to use tanliboy/lambda-qwen2.5-14b-dpo-test with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tanliboy/lambda-qwen2.5-14b-dpo-test with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tanliboy/lambda-qwen2.5-14b-dpo-test") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("tanliboy/lambda-qwen2.5-14b-dpo-test") model = AutoModelForCausalLM.from_pretrained("tanliboy/lambda-qwen2.5-14b-dpo-test", 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tanliboy/lambda-qwen2.5-14b-dpo-test with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tanliboy/lambda-qwen2.5-14b-dpo-test" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tanliboy/lambda-qwen2.5-14b-dpo-test", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/tanliboy/lambda-qwen2.5-14b-dpo-test
- SGLang
How to use tanliboy/lambda-qwen2.5-14b-dpo-test 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 "tanliboy/lambda-qwen2.5-14b-dpo-test" \ --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": "tanliboy/lambda-qwen2.5-14b-dpo-test", "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 "tanliboy/lambda-qwen2.5-14b-dpo-test" \ --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": "tanliboy/lambda-qwen2.5-14b-dpo-test", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use tanliboy/lambda-qwen2.5-14b-dpo-test with Docker Model Runner:
docker model run hf.co/tanliboy/lambda-qwen2.5-14b-dpo-test
End of training
Browse files
README.md
CHANGED
|
@@ -3,9 +3,15 @@ library_name: transformers
|
|
| 3 |
license: apache-2.0
|
| 4 |
base_model: Qwen/Qwen2.5-14B-Instruct
|
| 5 |
tags:
|
|
|
|
| 6 |
- trl
|
| 7 |
- dpo
|
| 8 |
- generated_from_trainer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
model-index:
|
| 10 |
- name: lambda-qwen2.5-14b-dpo-test
|
| 11 |
results: []
|
|
@@ -16,17 +22,17 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 16 |
|
| 17 |
# lambda-qwen2.5-14b-dpo-test
|
| 18 |
|
| 19 |
-
This model is a fine-tuned version of [Qwen/Qwen2.5-14B-Instruct](https://huggingface.co/Qwen/Qwen2.5-14B-Instruct) on
|
| 20 |
It achieves the following results on the evaluation set:
|
| 21 |
-
- Loss: 0.
|
| 22 |
-
- Rewards/chosen: -2.
|
| 23 |
-
- Rewards/rejected: -3.
|
| 24 |
- Rewards/accuracies: 0.7400
|
| 25 |
-
- Rewards/margins: 0.
|
| 26 |
-
- Logps/rejected: -
|
| 27 |
-
- Logps/chosen: -
|
| 28 |
-
- Logits/rejected: -1.
|
| 29 |
-
- Logits/chosen: -1.
|
| 30 |
|
| 31 |
## Model description
|
| 32 |
|
|
|
|
| 3 |
license: apache-2.0
|
| 4 |
base_model: Qwen/Qwen2.5-14B-Instruct
|
| 5 |
tags:
|
| 6 |
+
- alignment-handbook
|
| 7 |
- trl
|
| 8 |
- dpo
|
| 9 |
- generated_from_trainer
|
| 10 |
+
- trl
|
| 11 |
+
- dpo
|
| 12 |
+
- generated_from_trainer
|
| 13 |
+
datasets:
|
| 14 |
+
- HuggingFaceH4/ultrafeedback_binarized
|
| 15 |
model-index:
|
| 16 |
- name: lambda-qwen2.5-14b-dpo-test
|
| 17 |
results: []
|
|
|
|
| 22 |
|
| 23 |
# lambda-qwen2.5-14b-dpo-test
|
| 24 |
|
| 25 |
+
This model is a fine-tuned version of [Qwen/Qwen2.5-14B-Instruct](https://huggingface.co/Qwen/Qwen2.5-14B-Instruct) on the HuggingFaceH4/ultrafeedback_binarized dataset.
|
| 26 |
It achieves the following results on the evaluation set:
|
| 27 |
+
- Loss: 0.4919
|
| 28 |
+
- Rewards/chosen: -2.4745
|
| 29 |
+
- Rewards/rejected: -3.3729
|
| 30 |
- Rewards/accuracies: 0.7400
|
| 31 |
+
- Rewards/margins: 0.8984
|
| 32 |
+
- Logps/rejected: -832.0724
|
| 33 |
+
- Logps/chosen: -737.5234
|
| 34 |
+
- Logits/rejected: -1.2739
|
| 35 |
+
- Logits/chosen: -1.2560
|
| 36 |
|
| 37 |
## Model description
|
| 38 |
|
all_results.json
CHANGED
|
@@ -1,5 +1,18 @@
|
|
| 1 |
{
|
| 2 |
"epoch": 0.998691442030882,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
"total_flos": 0.0,
|
| 4 |
"train_loss": 0.5192520058629898,
|
| 5 |
"train_runtime": 13862.6582,
|
|
|
|
| 1 |
{
|
| 2 |
"epoch": 0.998691442030882,
|
| 3 |
+
"eval_logits/chosen": -1.2559658288955688,
|
| 4 |
+
"eval_logits/rejected": -1.27387535572052,
|
| 5 |
+
"eval_logps/chosen": -737.5234375,
|
| 6 |
+
"eval_logps/rejected": -832.0723876953125,
|
| 7 |
+
"eval_loss": 0.4919165074825287,
|
| 8 |
+
"eval_rewards/accuracies": 0.7400000095367432,
|
| 9 |
+
"eval_rewards/chosen": -2.4745123386383057,
|
| 10 |
+
"eval_rewards/margins": 0.8984242081642151,
|
| 11 |
+
"eval_rewards/rejected": -3.372936964035034,
|
| 12 |
+
"eval_runtime": 171.7011,
|
| 13 |
+
"eval_samples": 2000,
|
| 14 |
+
"eval_samples_per_second": 11.648,
|
| 15 |
+
"eval_steps_per_second": 0.728,
|
| 16 |
"total_flos": 0.0,
|
| 17 |
"train_loss": 0.5192520058629898,
|
| 18 |
"train_runtime": 13862.6582,
|
config.json
CHANGED
|
@@ -22,7 +22,7 @@
|
|
| 22 |
"tie_word_embeddings": false,
|
| 23 |
"torch_dtype": "bfloat16",
|
| 24 |
"transformers_version": "4.44.2",
|
| 25 |
-
"use_cache":
|
| 26 |
"use_sliding_window": false,
|
| 27 |
"vocab_size": 152064
|
| 28 |
}
|
|
|
|
| 22 |
"tie_word_embeddings": false,
|
| 23 |
"torch_dtype": "bfloat16",
|
| 24 |
"transformers_version": "4.44.2",
|
| 25 |
+
"use_cache": true,
|
| 26 |
"use_sliding_window": false,
|
| 27 |
"vocab_size": 152064
|
| 28 |
}
|
eval_results.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"epoch": 0.998691442030882,
|
| 3 |
+
"eval_logits/chosen": -1.2559658288955688,
|
| 4 |
+
"eval_logits/rejected": -1.27387535572052,
|
| 5 |
+
"eval_logps/chosen": -737.5234375,
|
| 6 |
+
"eval_logps/rejected": -832.0723876953125,
|
| 7 |
+
"eval_loss": 0.4919165074825287,
|
| 8 |
+
"eval_rewards/accuracies": 0.7400000095367432,
|
| 9 |
+
"eval_rewards/chosen": -2.4745123386383057,
|
| 10 |
+
"eval_rewards/margins": 0.8984242081642151,
|
| 11 |
+
"eval_rewards/rejected": -3.372936964035034,
|
| 12 |
+
"eval_runtime": 171.7011,
|
| 13 |
+
"eval_samples": 2000,
|
| 14 |
+
"eval_samples_per_second": 11.648,
|
| 15 |
+
"eval_steps_per_second": 0.728
|
| 16 |
+
}
|
runs/Sep20_06-57-19_action-graph-trainer/events.out.tfevents.1726830666.action-graph-trainer.2950951.1
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:db571b57bf9273880e77d43e711992ab399746b6048fb1ff1baba3d9e04d96da
|
| 3 |
+
size 828
|