Text Generation
Transformers
Safetensors
qwen2
Generated from Trainer
trl
dpo
conversational
text-generation-inference
Instructions to use obiwit/qwen2.5-3b-orpo-mini-fp-no-tools with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use obiwit/qwen2.5-3b-orpo-mini-fp-no-tools with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="obiwit/qwen2.5-3b-orpo-mini-fp-no-tools", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("obiwit/qwen2.5-3b-orpo-mini-fp-no-tools") model = AutoModelForCausalLM.from_pretrained("obiwit/qwen2.5-3b-orpo-mini-fp-no-tools", 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 obiwit/qwen2.5-3b-orpo-mini-fp-no-tools with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "obiwit/qwen2.5-3b-orpo-mini-fp-no-tools" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "obiwit/qwen2.5-3b-orpo-mini-fp-no-tools", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/obiwit/qwen2.5-3b-orpo-mini-fp-no-tools
- SGLang
How to use obiwit/qwen2.5-3b-orpo-mini-fp-no-tools 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 "obiwit/qwen2.5-3b-orpo-mini-fp-no-tools" \ --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": "obiwit/qwen2.5-3b-orpo-mini-fp-no-tools", "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 "obiwit/qwen2.5-3b-orpo-mini-fp-no-tools" \ --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": "obiwit/qwen2.5-3b-orpo-mini-fp-no-tools", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use obiwit/qwen2.5-3b-orpo-mini-fp-no-tools with Docker Model Runner:
docker model run hf.co/obiwit/qwen2.5-3b-orpo-mini-fp-no-tools
Model save
Browse files- README.md +1 -1
- all_results.json +4 -4
- config.json +1 -1
- train_results.json +4 -4
- trainer_state.json +4 -4
- training_args.bin +1 -1
README.md
CHANGED
|
@@ -27,7 +27,7 @@ print(output["generated_text"])
|
|
| 27 |
|
| 28 |
## Training procedure
|
| 29 |
|
| 30 |
-
[<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="150" height="24"/>](https://wandb.ai/bborges/CriteriaPreferences/runs/
|
| 31 |
|
| 32 |
This model was trained with DPO, a method introduced in [Direct Preference Optimization: Your Language Model is Secretly a Reward Model](https://huggingface.co/papers/2305.18290).
|
| 33 |
|
|
|
|
| 27 |
|
| 28 |
## Training procedure
|
| 29 |
|
| 30 |
+
[<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="150" height="24"/>](https://wandb.ai/bborges/CriteriaPreferences/runs/1o17w6l4)
|
| 31 |
|
| 32 |
This model was trained with DPO, a method introduced in [Direct Preference Optimization: Your Language Model is Secretly a Reward Model](https://huggingface.co/papers/2305.18290).
|
| 33 |
|
all_results.json
CHANGED
|
@@ -14,9 +14,9 @@
|
|
| 14 |
"eval_samples_per_second": 35.46,
|
| 15 |
"eval_steps_per_second": 0.555,
|
| 16 |
"total_flos": 0.0,
|
| 17 |
-
"train_loss": 0.
|
| 18 |
-
"train_runtime":
|
| 19 |
"train_samples": 1001516,
|
| 20 |
-
"train_samples_per_second":
|
| 21 |
-
"train_steps_per_second":
|
| 22 |
}
|
|
|
|
| 14 |
"eval_samples_per_second": 35.46,
|
| 15 |
"eval_steps_per_second": 0.555,
|
| 16 |
"total_flos": 0.0,
|
| 17 |
+
"train_loss": 0.0,
|
| 18 |
+
"train_runtime": 35.8808,
|
| 19 |
"train_samples": 1001516,
|
| 20 |
+
"train_samples_per_second": 27912.31,
|
| 21 |
+
"train_steps_per_second": 218.055
|
| 22 |
}
|
config.json
CHANGED
|
@@ -23,7 +23,7 @@
|
|
| 23 |
"tie_word_embeddings": true,
|
| 24 |
"torch_dtype": "bfloat16",
|
| 25 |
"transformers_version": "4.46.3",
|
| 26 |
-
"use_cache":
|
| 27 |
"use_mrope": false,
|
| 28 |
"use_sliding_window": false,
|
| 29 |
"vocab_size": 151936
|
|
|
|
| 23 |
"tie_word_embeddings": true,
|
| 24 |
"torch_dtype": "bfloat16",
|
| 25 |
"transformers_version": "4.46.3",
|
| 26 |
+
"use_cache": false,
|
| 27 |
"use_mrope": false,
|
| 28 |
"use_sliding_window": false,
|
| 29 |
"vocab_size": 151936
|
train_results.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
{
|
| 2 |
"epoch": 0.9999360981532366,
|
| 3 |
"total_flos": 0.0,
|
| 4 |
-
"train_loss": 0.
|
| 5 |
-
"train_runtime":
|
| 6 |
"train_samples": 1001516,
|
| 7 |
-
"train_samples_per_second":
|
| 8 |
-
"train_steps_per_second":
|
| 9 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"epoch": 0.9999360981532366,
|
| 3 |
"total_flos": 0.0,
|
| 4 |
+
"train_loss": 0.0,
|
| 5 |
+
"train_runtime": 35.8808,
|
| 6 |
"train_samples": 1001516,
|
| 7 |
+
"train_samples_per_second": 27912.31,
|
| 8 |
+
"train_steps_per_second": 218.055
|
| 9 |
}
|
trainer_state.json
CHANGED
|
@@ -11773,10 +11773,10 @@
|
|
| 11773 |
"epoch": 0.9999360981532366,
|
| 11774 |
"step": 7824,
|
| 11775 |
"total_flos": 0.0,
|
| 11776 |
-
"train_loss": 0.
|
| 11777 |
-
"train_runtime":
|
| 11778 |
-
"train_samples_per_second":
|
| 11779 |
-
"train_steps_per_second":
|
| 11780 |
}
|
| 11781 |
],
|
| 11782 |
"logging_steps": 10,
|
|
|
|
| 11773 |
"epoch": 0.9999360981532366,
|
| 11774 |
"step": 7824,
|
| 11775 |
"total_flos": 0.0,
|
| 11776 |
+
"train_loss": 0.0,
|
| 11777 |
+
"train_runtime": 35.8808,
|
| 11778 |
+
"train_samples_per_second": 27912.31,
|
| 11779 |
+
"train_steps_per_second": 218.055
|
| 11780 |
}
|
| 11781 |
],
|
| 11782 |
"logging_steps": 10,
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 7864
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ec2bb7f896e300d6891a94b301b4c7cb3fc8c4555a5fa9a87292a6cc967cd154
|
| 3 |
size 7864
|