Text Generation
Transformers
TensorBoard
Safetensors
llama
Generated from Trainer
trl
dpo
conversational
text-generation-inference
Instructions to use Sim4Rec/inter-play-sim-assistant-dpo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Sim4Rec/inter-play-sim-assistant-dpo with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Sim4Rec/inter-play-sim-assistant-dpo") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Sim4Rec/inter-play-sim-assistant-dpo") model = AutoModelForCausalLM.from_pretrained("Sim4Rec/inter-play-sim-assistant-dpo") 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
- vLLM
How to use Sim4Rec/inter-play-sim-assistant-dpo with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Sim4Rec/inter-play-sim-assistant-dpo" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Sim4Rec/inter-play-sim-assistant-dpo", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Sim4Rec/inter-play-sim-assistant-dpo
- SGLang
How to use Sim4Rec/inter-play-sim-assistant-dpo 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 "Sim4Rec/inter-play-sim-assistant-dpo" \ --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": "Sim4Rec/inter-play-sim-assistant-dpo", "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 "Sim4Rec/inter-play-sim-assistant-dpo" \ --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": "Sim4Rec/inter-play-sim-assistant-dpo", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Sim4Rec/inter-play-sim-assistant-dpo with Docker Model Runner:
docker model run hf.co/Sim4Rec/inter-play-sim-assistant-dpo
Model save
Browse files- README.md +6 -9
- all_results.json +5 -5
- generation_config.json +1 -1
- train_results.json +5 -5
- trainer_state.json +0 -0
README.md
CHANGED
|
@@ -1,9 +1,6 @@
|
|
| 1 |
---
|
| 2 |
-
base_model: Sim4Rec/inter-play-sim-assistant-sft
|
| 3 |
-
datasets:
|
| 4 |
-
- Sim4Rec/dpo_data
|
| 5 |
library_name: transformers
|
| 6 |
-
model_name:
|
| 7 |
tags:
|
| 8 |
- generated_from_trainer
|
| 9 |
- trl
|
|
@@ -11,9 +8,9 @@ tags:
|
|
| 11 |
licence: license
|
| 12 |
---
|
| 13 |
|
| 14 |
-
# Model Card for
|
| 15 |
|
| 16 |
-
This model is a fine-tuned version of [
|
| 17 |
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 18 |
|
| 19 |
## Quick start
|
|
@@ -29,7 +26,7 @@ print(output["generated_text"])
|
|
| 29 |
|
| 30 |
## Training procedure
|
| 31 |
|
| 32 |
-
[<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/jerome-ramos-20/huggingface/runs/
|
| 33 |
|
| 34 |
|
| 35 |
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).
|
|
@@ -37,8 +34,8 @@ This model was trained with DPO, a method introduced in [Direct Preference Optim
|
|
| 37 |
### Framework versions
|
| 38 |
|
| 39 |
- TRL: 0.14.0
|
| 40 |
-
- Transformers: 4.
|
| 41 |
-
- Pytorch: 2.
|
| 42 |
- Datasets: 3.0.1
|
| 43 |
- Tokenizers: 0.21.0
|
| 44 |
|
|
|
|
| 1 |
---
|
|
|
|
|
|
|
|
|
|
| 2 |
library_name: transformers
|
| 3 |
+
model_name: inter-play-sim-assistant-dpo
|
| 4 |
tags:
|
| 5 |
- generated_from_trainer
|
| 6 |
- trl
|
|
|
|
| 8 |
licence: license
|
| 9 |
---
|
| 10 |
|
| 11 |
+
# Model Card for inter-play-sim-assistant-dpo
|
| 12 |
|
| 13 |
+
This model is a fine-tuned version of [None](https://huggingface.co/None).
|
| 14 |
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 15 |
|
| 16 |
## Quick start
|
|
|
|
| 26 |
|
| 27 |
## Training procedure
|
| 28 |
|
| 29 |
+
[<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/jerome-ramos-20/huggingface/runs/vv6cqfq5)
|
| 30 |
|
| 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).
|
|
|
|
| 34 |
### Framework versions
|
| 35 |
|
| 36 |
- TRL: 0.14.0
|
| 37 |
+
- Transformers: 4.51.3
|
| 38 |
+
- Pytorch: 2.6.0
|
| 39 |
- Datasets: 3.0.1
|
| 40 |
- Tokenizers: 0.21.0
|
| 41 |
|
all_results.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
{
|
| 2 |
"epoch": 1.0,
|
| 3 |
"total_flos": 0.0,
|
| 4 |
-
"train_loss": 0.
|
| 5 |
-
"train_runtime":
|
| 6 |
-
"train_samples":
|
| 7 |
-
"train_samples_per_second":
|
| 8 |
-
"train_steps_per_second": 0.
|
| 9 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"epoch": 1.0,
|
| 3 |
"total_flos": 0.0,
|
| 4 |
+
"train_loss": 0.16149422216962198,
|
| 5 |
+
"train_runtime": 9781.4907,
|
| 6 |
+
"train_samples": 45695,
|
| 7 |
+
"train_samples_per_second": 4.672,
|
| 8 |
+
"train_steps_per_second": 0.146
|
| 9 |
}
|
generation_config.json
CHANGED
|
@@ -5,5 +5,5 @@
|
|
| 5 |
"eos_token_id": 128001,
|
| 6 |
"temperature": 0.6,
|
| 7 |
"top_p": 0.9,
|
| 8 |
-
"transformers_version": "4.
|
| 9 |
}
|
|
|
|
| 5 |
"eos_token_id": 128001,
|
| 6 |
"temperature": 0.6,
|
| 7 |
"top_p": 0.9,
|
| 8 |
+
"transformers_version": "4.51.3"
|
| 9 |
}
|
train_results.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
{
|
| 2 |
"epoch": 1.0,
|
| 3 |
"total_flos": 0.0,
|
| 4 |
-
"train_loss": 0.
|
| 5 |
-
"train_runtime":
|
| 6 |
-
"train_samples":
|
| 7 |
-
"train_samples_per_second":
|
| 8 |
-
"train_steps_per_second": 0.
|
| 9 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"epoch": 1.0,
|
| 3 |
"total_flos": 0.0,
|
| 4 |
+
"train_loss": 0.16149422216962198,
|
| 5 |
+
"train_runtime": 9781.4907,
|
| 6 |
+
"train_samples": 45695,
|
| 7 |
+
"train_samples_per_second": 4.672,
|
| 8 |
+
"train_steps_per_second": 0.146
|
| 9 |
}
|
trainer_state.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|