Text Generation
Transformers
TensorBoard
Safetensors
llama
alignment-handbook
trl
dpo
Generated from Trainer
conversational
text-generation-inference
Instructions to use tanliboy/lambda-llama-3-8b-dpo-test with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tanliboy/lambda-llama-3-8b-dpo-test with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tanliboy/lambda-llama-3-8b-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-llama-3-8b-dpo-test") model = AutoModelForCausalLM.from_pretrained("tanliboy/lambda-llama-3-8b-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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tanliboy/lambda-llama-3-8b-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-llama-3-8b-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-llama-3-8b-dpo-test", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/tanliboy/lambda-llama-3-8b-dpo-test
- SGLang
How to use tanliboy/lambda-llama-3-8b-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-llama-3-8b-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-llama-3-8b-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-llama-3-8b-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-llama-3-8b-dpo-test", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use tanliboy/lambda-llama-3-8b-dpo-test with Docker Model Runner:
docker model run hf.co/tanliboy/lambda-llama-3-8b-dpo-test
End of training
Browse files
README.md
CHANGED
|
@@ -3,9 +3,15 @@ library_name: transformers
|
|
| 3 |
license: llama3.1
|
| 4 |
base_model: meta-llama/Meta-Llama-3.1-8B-Instruct
|
| 5 |
tags:
|
|
|
|
| 6 |
- trl
|
| 7 |
- dpo
|
| 8 |
- generated_from_trainer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
model-index:
|
| 10 |
- name: lambda-llama-3-8b-dpo-test
|
| 11 |
results: []
|
|
@@ -16,17 +22,17 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 16 |
|
| 17 |
# lambda-llama-3-8b-dpo-test
|
| 18 |
|
| 19 |
-
This model is a fine-tuned version of [meta-llama/Meta-Llama-3.1-8B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3.1-8B-Instruct) on
|
| 20 |
It achieves the following results on the evaluation set:
|
| 21 |
-
- Loss: 0.
|
| 22 |
-
- Rewards/chosen: -1.
|
| 23 |
-
- Rewards/rejected: -1.
|
| 24 |
- Rewards/accuracies: 0.7063
|
| 25 |
-
- Rewards/margins: 0.
|
| 26 |
-
- Logps/rejected: -
|
| 27 |
-
- Logps/chosen: -509.
|
| 28 |
-
- Logits/rejected: -2.
|
| 29 |
-
- Logits/chosen: -2.
|
| 30 |
|
| 31 |
## Model description
|
| 32 |
|
|
|
|
| 3 |
license: llama3.1
|
| 4 |
base_model: meta-llama/Meta-Llama-3.1-8B-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-llama-3-8b-dpo-test
|
| 17 |
results: []
|
|
|
|
| 22 |
|
| 23 |
# lambda-llama-3-8b-dpo-test
|
| 24 |
|
| 25 |
+
This model is a fine-tuned version of [meta-llama/Meta-Llama-3.1-8B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3.1-8B-Instruct) on the HuggingFaceH4/ultrafeedback_binarized dataset.
|
| 26 |
It achieves the following results on the evaluation set:
|
| 27 |
+
- Loss: 0.5772
|
| 28 |
+
- Rewards/chosen: -1.0430
|
| 29 |
+
- Rewards/rejected: -1.6270
|
| 30 |
- Rewards/accuracies: 0.7063
|
| 31 |
+
- Rewards/margins: 0.5841
|
| 32 |
+
- Logps/rejected: -558.6804
|
| 33 |
+
- Logps/chosen: -509.0577
|
| 34 |
+
- Logits/rejected: -2.5324
|
| 35 |
+
- Logits/chosen: -2.3779
|
| 36 |
|
| 37 |
## Model description
|
| 38 |
|
all_results.json
CHANGED
|
@@ -1,5 +1,18 @@
|
|
| 1 |
{
|
| 2 |
"epoch": 0.9984301412872841,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
"total_flos": 0.0,
|
| 4 |
"train_loss": 0.6095632167232361,
|
| 5 |
"train_runtime": 6900.3625,
|
|
|
|
| 1 |
{
|
| 2 |
"epoch": 0.9984301412872841,
|
| 3 |
+
"eval_logits/chosen": -2.3779289722442627,
|
| 4 |
+
"eval_logits/rejected": -2.5323691368103027,
|
| 5 |
+
"eval_logps/chosen": -509.05767822265625,
|
| 6 |
+
"eval_logps/rejected": -558.6803588867188,
|
| 7 |
+
"eval_loss": 0.577161967754364,
|
| 8 |
+
"eval_rewards/accuracies": 0.7063491940498352,
|
| 9 |
+
"eval_rewards/chosen": -1.0429552793502808,
|
| 10 |
+
"eval_rewards/margins": 0.5840887427330017,
|
| 11 |
+
"eval_rewards/rejected": -1.6270442008972168,
|
| 12 |
+
"eval_runtime": 88.0288,
|
| 13 |
+
"eval_samples": 2000,
|
| 14 |
+
"eval_samples_per_second": 22.72,
|
| 15 |
+
"eval_steps_per_second": 0.716,
|
| 16 |
"total_flos": 0.0,
|
| 17 |
"train_loss": 0.6095632167232361,
|
| 18 |
"train_runtime": 6900.3625,
|
config.json
CHANGED
|
@@ -34,6 +34,6 @@
|
|
| 34 |
"tie_word_embeddings": false,
|
| 35 |
"torch_dtype": "bfloat16",
|
| 36 |
"transformers_version": "4.44.2",
|
| 37 |
-
"use_cache":
|
| 38 |
"vocab_size": 128256
|
| 39 |
}
|
|
|
|
| 34 |
"tie_word_embeddings": false,
|
| 35 |
"torch_dtype": "bfloat16",
|
| 36 |
"transformers_version": "4.44.2",
|
| 37 |
+
"use_cache": true,
|
| 38 |
"vocab_size": 128256
|
| 39 |
}
|
eval_results.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"epoch": 0.9984301412872841,
|
| 3 |
+
"eval_logits/chosen": -2.3779289722442627,
|
| 4 |
+
"eval_logits/rejected": -2.5323691368103027,
|
| 5 |
+
"eval_logps/chosen": -509.05767822265625,
|
| 6 |
+
"eval_logps/rejected": -558.6803588867188,
|
| 7 |
+
"eval_loss": 0.577161967754364,
|
| 8 |
+
"eval_rewards/accuracies": 0.7063491940498352,
|
| 9 |
+
"eval_rewards/chosen": -1.0429552793502808,
|
| 10 |
+
"eval_rewards/margins": 0.5840887427330017,
|
| 11 |
+
"eval_rewards/rejected": -1.6270442008972168,
|
| 12 |
+
"eval_runtime": 88.0288,
|
| 13 |
+
"eval_samples": 2000,
|
| 14 |
+
"eval_samples_per_second": 22.72,
|
| 15 |
+
"eval_steps_per_second": 0.716
|
| 16 |
+
}
|
runs/Sep18_05-34-48_action-graph-trainer/events.out.tfevents.1726645681.action-graph-trainer.2590949.1
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cee8d99cc06b68f719923a25121d0600d7c9ba66c6c08e67a83e34513defc0ac
|
| 3 |
+
size 828
|