Text Generation
Transformers
TensorBoard
Safetensors
llama
Generated from Trainer
dpo-smolK12-100
trl
dpo
conversational
text-generation-inference
Instructions to use thatupiso/SmolLM2-FT-DPO2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use thatupiso/SmolLM2-FT-DPO2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="thatupiso/SmolLM2-FT-DPO2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("thatupiso/SmolLM2-FT-DPO2") model = AutoModelForCausalLM.from_pretrained("thatupiso/SmolLM2-FT-DPO2", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use thatupiso/SmolLM2-FT-DPO2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "thatupiso/SmolLM2-FT-DPO2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "thatupiso/SmolLM2-FT-DPO2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/thatupiso/SmolLM2-FT-DPO2
- SGLang
How to use thatupiso/SmolLM2-FT-DPO2 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 "thatupiso/SmolLM2-FT-DPO2" \ --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": "thatupiso/SmolLM2-FT-DPO2", "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 "thatupiso/SmolLM2-FT-DPO2" \ --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": "thatupiso/SmolLM2-FT-DPO2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use thatupiso/SmolLM2-FT-DPO2 with Docker Model Runner:
docker model run hf.co/thatupiso/SmolLM2-FT-DPO2
End of training
Browse files- README.md +2 -3
- runs/Dec12_20-07-50_3393362a4d02/events.out.tfevents.1734034093.3393362a4d02.7235.0 +3 -0
- runs/Dec12_20-23-09_3393362a4d02/events.out.tfevents.1734035019.3393362a4d02.7235.1 +3 -0
- runs/Dec12_20-24-40_3393362a4d02/events.out.tfevents.1734035190.3393362a4d02.7235.2 +3 -0
- training_args.bin +1 -1
README.md
CHANGED
|
@@ -4,8 +4,7 @@ library_name: transformers
|
|
| 4 |
model_name: SmolLM2-FT-DPO2
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
| 7 |
-
-
|
| 8 |
-
- module_1
|
| 9 |
- trl
|
| 10 |
- dpo
|
| 11 |
licence: license
|
|
@@ -29,7 +28,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/thatupiso-code-org/huggingface/runs/
|
| 33 |
|
| 34 |
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).
|
| 35 |
|
|
|
|
| 4 |
model_name: SmolLM2-FT-DPO2
|
| 5 |
tags:
|
| 6 |
- generated_from_trainer
|
| 7 |
+
- dpo-smolK12-100
|
|
|
|
| 8 |
- trl
|
| 9 |
- dpo
|
| 10 |
licence: license
|
|
|
|
| 28 |
|
| 29 |
## Training procedure
|
| 30 |
|
| 31 |
+
[<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/thatupiso-code-org/huggingface/runs/xpcn3ywm)
|
| 32 |
|
| 33 |
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 |
|
runs/Dec12_20-07-50_3393362a4d02/events.out.tfevents.1734034093.3393362a4d02.7235.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c4fe8439c4d0e4bf0e674877c5e8b1f87e3d1eca8060c9c4efde206930a3d294
|
| 3 |
+
size 13260
|
runs/Dec12_20-23-09_3393362a4d02/events.out.tfevents.1734035019.3393362a4d02.7235.1
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0f9f0e0fe7b9f89ae5720ca6baf57453966f4c8c3158a921f02bb12b8d8aa3bf
|
| 3 |
+
size 27116
|
runs/Dec12_20-24-40_3393362a4d02/events.out.tfevents.1734035190.3393362a4d02.7235.2
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:853133961a02f0d971d003a31cb5cef46086c39367d37c950dd84c673478a3d0
|
| 3 |
+
size 40308
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 6072
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:82c7343ca0657002fe93055a64e96268492c8ea1017027804786a56752e20079
|
| 3 |
size 6072
|