Text Generation
Transformers
Safetensors
PyTorch
English
Spanish
neollm
causal-lm
research
dpo
conversational
custom_code
Instructions to use KitsuVp/NeoLLM-Instruct-DPO with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KitsuVp/NeoLLM-Instruct-DPO with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="KitsuVp/NeoLLM-Instruct-DPO", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("KitsuVp/NeoLLM-Instruct-DPO", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use KitsuVp/NeoLLM-Instruct-DPO with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "KitsuVp/NeoLLM-Instruct-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": "KitsuVp/NeoLLM-Instruct-DPO", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/KitsuVp/NeoLLM-Instruct-DPO
- SGLang
How to use KitsuVp/NeoLLM-Instruct-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 "KitsuVp/NeoLLM-Instruct-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": "KitsuVp/NeoLLM-Instruct-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 "KitsuVp/NeoLLM-Instruct-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": "KitsuVp/NeoLLM-Instruct-DPO", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use KitsuVp/NeoLLM-Instruct-DPO with Docker Model Runner:
docker model run hf.co/KitsuVp/NeoLLM-Instruct-DPO
Diagram NeoLLM objective flow and data checks
Browse files- .gitattributes +2 -0
- README.md +8 -0
- docs/data-acceptance.png +3 -0
- docs/objective-routing.png +3 -0
.gitattributes
CHANGED
|
@@ -35,3 +35,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
docs/dpo-workflow.png filter=lfs diff=lfs merge=lfs -text
|
| 37 |
docs/validation-workflow.png filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
docs/dpo-workflow.png filter=lfs diff=lfs merge=lfs -text
|
| 37 |
docs/validation-workflow.png filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
docs/objective-routing.png filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
docs/data-acceptance.png filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -52,6 +52,8 @@ Use DPO when two answers to the same prompt demonstrate a clear preference, such
|
|
| 52 |
|
| 53 |
### Objective handling in DPO
|
| 54 |
|
|
|
|
|
|
|
| 55 |
The policy update combined **clean sigmoid DPO with `β=0.1`** and **`0.1 ×` a chosen-only SFT loss**. The policy and frozen SFT reference scored both replies through EOS using the same clean inputs. The reference scores were precomputed without gradients. The same setup was used in the pilot and the extended run.
|
| 56 |
|
| 57 |
| Component | Clean pair scoring | Chosen-only SFT anchor on the trainable policy |
|
|
@@ -65,6 +67,12 @@ The policy update combined **clean sigmoid DPO with `β=0.1`** and **`0.1 ×` a
|
|
| 65 |
|
| 66 |
For a labeled window, the clean sequence score is `−N × CE`, where `N` is the number of valid shifted completion targets and CE is the unweighted mixed-distribution cross-entropy. The anchor is computed separately in training mode. Its auxiliary terms contribute to the policy update outside the preference log-ratios.
|
| 67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
## Evaluation and limitations
|
| 69 |
|
| 70 |
[](./docs/validation-workflow.png)
|
|
|
|
| 52 |
|
| 53 |
### Objective handling in DPO
|
| 54 |
|
| 55 |
+
[](./docs/objective-routing.png)
|
| 56 |
+
|
| 57 |
The policy update combined **clean sigmoid DPO with `β=0.1`** and **`0.1 ×` a chosen-only SFT loss**. The policy and frozen SFT reference scored both replies through EOS using the same clean inputs. The reference scores were precomputed without gradients. The same setup was used in the pilot and the extended run.
|
| 58 |
|
| 59 |
| Component | Clean pair scoring | Chosen-only SFT anchor on the trainable policy |
|
|
|
|
| 67 |
|
| 68 |
For a labeled window, the clean sequence score is `−N × CE`, where `N` is the number of valid shifted completion targets and CE is the unweighted mixed-distribution cross-entropy. The anchor is computed separately in training mode. Its auxiliary terms contribute to the policy update outside the preference log-ratios.
|
| 69 |
|
| 70 |
+
### Data acceptance and debugging
|
| 71 |
+
|
| 72 |
+
[](./docs/data-acceptance.png)
|
| 73 |
+
|
| 74 |
+
For a new run, keep the original pair and record the first failing check. Repair the derived example or scoring code and repeat the check. This pipeline validated distinct replies and a shared tokenized prefix, excluded exact training-prefix matches from the held-out set, and trimmed supervision after the last EOS. For a generation failure, trace the first wrong token with the mixed distribution and the vocabulary-only diagnostic.
|
| 75 |
+
|
| 76 |
## Evaluation and limitations
|
| 77 |
|
| 78 |
[](./docs/validation-workflow.png)
|
docs/data-acceptance.png
ADDED
|
Git LFS Details
|
docs/objective-routing.png
ADDED
|
Git LFS Details
|