Text Generation
Transformers
Safetensors
qwen2
Generated from Trainer
trl
dpo
conversational
text-generation-inference
Instructions to use obiwit/qwen2.5-3b-orpo-mini-1e 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-1e 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-1e", 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-1e") model = AutoModelForCausalLM.from_pretrained("obiwit/qwen2.5-3b-orpo-mini-1e", 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-1e 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-1e" # 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-1e", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/obiwit/qwen2.5-3b-orpo-mini-1e
- SGLang
How to use obiwit/qwen2.5-3b-orpo-mini-1e 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-1e" \ --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-1e", "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-1e" \ --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-1e", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use obiwit/qwen2.5-3b-orpo-mini-1e with Docker Model Runner:
docker model run hf.co/obiwit/qwen2.5-3b-orpo-mini-1e
End of training
Browse files- all_results.json +13 -0
- config.json +1 -1
- eval_results.json +16 -0
all_results.json
CHANGED
|
@@ -1,5 +1,18 @@
|
|
| 1 |
{
|
| 2 |
"epoch": 0.9999360981532366,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
"total_flos": 0.0,
|
| 4 |
"train_loss": 0.15513539346266378,
|
| 5 |
"train_runtime": 70698.5942,
|
|
|
|
| 1 |
{
|
| 2 |
"epoch": 0.9999360981532366,
|
| 3 |
+
"eval_logits/chosen": -1.28125,
|
| 4 |
+
"eval_logits/rejected": -0.87109375,
|
| 5 |
+
"eval_logps/chosen": -384.0,
|
| 6 |
+
"eval_logps/rejected": -426.0,
|
| 7 |
+
"eval_loss": 0.22941964864730835,
|
| 8 |
+
"eval_rewards/accuracies": 0.9068260192871094,
|
| 9 |
+
"eval_rewards/chosen": -17.375,
|
| 10 |
+
"eval_rewards/margins": 6.09375,
|
| 11 |
+
"eval_rewards/rejected": -23.5,
|
| 12 |
+
"eval_runtime": 1564.413,
|
| 13 |
+
"eval_samples": 55582,
|
| 14 |
+
"eval_samples_per_second": 35.48,
|
| 15 |
+
"eval_steps_per_second": 0.555,
|
| 16 |
"total_flos": 0.0,
|
| 17 |
"train_loss": 0.15513539346266378,
|
| 18 |
"train_runtime": 70698.5942,
|
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": true,
|
| 27 |
"use_mrope": false,
|
| 28 |
"use_sliding_window": false,
|
| 29 |
"vocab_size": 151936
|
eval_results.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"epoch": 0.9999360981532366,
|
| 3 |
+
"eval_logits/chosen": -1.28125,
|
| 4 |
+
"eval_logits/rejected": -0.87109375,
|
| 5 |
+
"eval_logps/chosen": -384.0,
|
| 6 |
+
"eval_logps/rejected": -426.0,
|
| 7 |
+
"eval_loss": 0.22941964864730835,
|
| 8 |
+
"eval_rewards/accuracies": 0.9068260192871094,
|
| 9 |
+
"eval_rewards/chosen": -17.375,
|
| 10 |
+
"eval_rewards/margins": 6.09375,
|
| 11 |
+
"eval_rewards/rejected": -23.5,
|
| 12 |
+
"eval_runtime": 1564.413,
|
| 13 |
+
"eval_samples": 55582,
|
| 14 |
+
"eval_samples_per_second": 35.48,
|
| 15 |
+
"eval_steps_per_second": 0.555
|
| 16 |
+
}
|