Text Generation
Transformers
TensorBoard
Safetensors
qwen2
alignment-handbook
trl
dpo
Generated from Trainer
conversational
text-generation-inference
Instructions to use tanliboy/lambda-qwen2.5-32b-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-32b-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-32b-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-32b-dpo-test") model = AutoModelForCausalLM.from_pretrained("tanliboy/lambda-qwen2.5-32b-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-32b-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-32b-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-32b-dpo-test", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/tanliboy/lambda-qwen2.5-32b-dpo-test
- SGLang
How to use tanliboy/lambda-qwen2.5-32b-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-32b-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-32b-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-32b-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-32b-dpo-test", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use tanliboy/lambda-qwen2.5-32b-dpo-test with Docker Model Runner:
docker model run hf.co/tanliboy/lambda-qwen2.5-32b-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-32B-Instruct
|
| 5 |
tags:
|
|
|
|
| 6 |
- trl
|
| 7 |
- dpo
|
| 8 |
- generated_from_trainer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
model-index:
|
| 10 |
- name: lambda-qwen2.5-32b-dpo-test
|
| 11 |
results: []
|
|
@@ -16,17 +22,17 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 16 |
|
| 17 |
# lambda-qwen2.5-32b-dpo-test
|
| 18 |
|
| 19 |
-
This model is a fine-tuned version of [Qwen/Qwen2.5-32B-Instruct](https://huggingface.co/Qwen/Qwen2.5-32B-Instruct) on
|
| 20 |
It achieves the following results on the evaluation set:
|
| 21 |
-
- Loss: 0.
|
| 22 |
-
- Rewards/chosen: -10.
|
| 23 |
-
- Rewards/rejected: -
|
| 24 |
- Rewards/accuracies: 1.0
|
| 25 |
-
- Rewards/margins: 15.
|
| 26 |
-
- Logps/rejected: -
|
| 27 |
-
- Logps/chosen: -
|
| 28 |
-
- Logits/rejected: -0.
|
| 29 |
-
- Logits/chosen: -0.
|
| 30 |
|
| 31 |
## Model description
|
| 32 |
|
|
|
|
| 3 |
license: apache-2.0
|
| 4 |
base_model: Qwen/Qwen2.5-32B-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 |
+
- tanliboy/orca_dpo_pairs
|
| 15 |
model-index:
|
| 16 |
- name: lambda-qwen2.5-32b-dpo-test
|
| 17 |
results: []
|
|
|
|
| 22 |
|
| 23 |
# lambda-qwen2.5-32b-dpo-test
|
| 24 |
|
| 25 |
+
This model is a fine-tuned version of [Qwen/Qwen2.5-32B-Instruct](https://huggingface.co/Qwen/Qwen2.5-32B-Instruct) on the tanliboy/orca_dpo_pairs dataset.
|
| 26 |
It achieves the following results on the evaluation set:
|
| 27 |
+
- Loss: 0.0003
|
| 28 |
+
- Rewards/chosen: -10.1618
|
| 29 |
+
- Rewards/rejected: -26.1150
|
| 30 |
- Rewards/accuracies: 1.0
|
| 31 |
+
- Rewards/margins: 15.9532
|
| 32 |
+
- Logps/rejected: -3049.5271
|
| 33 |
+
- Logps/chosen: -1372.8903
|
| 34 |
+
- Logits/rejected: -0.3154
|
| 35 |
+
- Logits/chosen: -0.0600
|
| 36 |
|
| 37 |
## Model description
|
| 38 |
|
all_results.json
CHANGED
|
@@ -1,5 +1,18 @@
|
|
| 1 |
{
|
| 2 |
"epoch": 1.0,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
"total_flos": 0.0,
|
| 4 |
"train_loss": 0.10807222205026247,
|
| 5 |
"train_runtime": 19238.6363,
|
|
|
|
| 1 |
{
|
| 2 |
"epoch": 1.0,
|
| 3 |
+
"eval_logits/chosen": -0.05997615307569504,
|
| 4 |
+
"eval_logits/rejected": -0.31538692116737366,
|
| 5 |
+
"eval_logps/chosen": -1372.8902587890625,
|
| 6 |
+
"eval_logps/rejected": -3049.527099609375,
|
| 7 |
+
"eval_loss": 0.00032760968315415084,
|
| 8 |
+
"eval_rewards/accuracies": 1.0,
|
| 9 |
+
"eval_rewards/chosen": -10.161836624145508,
|
| 10 |
+
"eval_rewards/margins": 15.953170776367188,
|
| 11 |
+
"eval_rewards/rejected": -26.115005493164062,
|
| 12 |
+
"eval_runtime": 107.6139,
|
| 13 |
+
"eval_samples": 643,
|
| 14 |
+
"eval_samples_per_second": 5.975,
|
| 15 |
+
"eval_steps_per_second": 0.381,
|
| 16 |
"total_flos": 0.0,
|
| 17 |
"train_loss": 0.10807222205026247,
|
| 18 |
"train_runtime": 19238.6363,
|
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": 1.0,
|
| 3 |
+
"eval_logits/chosen": -0.05997615307569504,
|
| 4 |
+
"eval_logits/rejected": -0.31538692116737366,
|
| 5 |
+
"eval_logps/chosen": -1372.8902587890625,
|
| 6 |
+
"eval_logps/rejected": -3049.527099609375,
|
| 7 |
+
"eval_loss": 0.00032760968315415084,
|
| 8 |
+
"eval_rewards/accuracies": 1.0,
|
| 9 |
+
"eval_rewards/chosen": -10.161836624145508,
|
| 10 |
+
"eval_rewards/margins": 15.953170776367188,
|
| 11 |
+
"eval_rewards/rejected": -26.115005493164062,
|
| 12 |
+
"eval_runtime": 107.6139,
|
| 13 |
+
"eval_samples": 643,
|
| 14 |
+
"eval_samples_per_second": 5.975,
|
| 15 |
+
"eval_steps_per_second": 0.381
|
| 16 |
+
}
|
runs/Sep22_06-14-42_action-graph-trainer/events.out.tfevents.1727006142.action-graph-trainer.3370934.1
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:de74538ff0866da97fc1ebd7a1bc0cc15bb1619ebd600a84118e3a20d412c9f5
|
| 3 |
+
size 828
|