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
NeoLLM-Instruct-DPO
This is an experimental English and Spanish preference-tuning checkpoint for NeoLLM, an 85.2M parameter causal language model. The pilot improved held-out relative preference margins on the sampled Spanish pairs. The English result was close to the reference baseline, and neither checkpoint matched any of the 20 constrained answers in our generation probe.
| Provenance | Value |
|---|---|
| Starting policy and frozen reference | KitsuVp/NeoLLM-Instruct |
| Starting policy and reference revision | 208a47045e03be2861777edaeebf91ea01c7ac3c |
| Starting policy and reference weights SHA-256 | e6f036d544f4c752df0c61de14a621f6a59bdbb686104a0cfdea00b7bb6fc2a6 |
| Original pretrained model | KitsuVp/NeoLLM |
| Original pretrained weights SHA-256 | 524338e290cb19b98d1f7b88120dcea7a957a58b464e2b24add5f38bb00a3561 |
| Model code revision | 64d51e3150bcdf298746d956afe03893583654ef |
| Released DPO weights SHA-256 | 4f7dbf81a6887c3324ec5ab94b158f6d3cc4b67d2be47c3595a5842da260b696 |
Data and training
This run used 400 offline preference pairs from a prepared pool of 8,844. The training sample contained 196 English and 204 Spanish prompts. It used 179 pairs from UltraFeedback, 186 from the Spanish split of multilingual Orca DPO, and 35 synthetic bilingual preference pairs curated in Antigravity for prompt echo, repetition, formatting, and requested copying. This is a pilot using a bounded subset of the available data.
We ran sigmoid DPO with beta 0.1, learning rate 5e-7, and one pair per optimizer step. Policy and reference scores use the same clean, unweighted sequence log probabilities with Copy-Paste active and dropout disabled. We sum answer-token log probabilities through EOS. Long examples may span rolling windows with length 512 and stride 256, so their left context is limited. This was one hyperparameter setting. DPO paper
A separate supervised objective on the preferred completion has weight 0.1. It retains Copy-Paste, MiLe, μ-loss, NITP, TWEO, and MEAP using the clean and masked training views described in the SFT card. The retained FP32 master weights were trained with BF16 autocast and fused AdamW. The model can be loaded in BF16 for inference. SFT training details
DPO workflow
Use DPO when two answers to the same prompt demonstrate a clear preference, such as a correct format or less repetition. Use SFT when you primarily have demonstrations of the desired behavior.
- Prepare comparable pairs. Match the tokenized prompt, template, context policy, and precision on both branches. Score completion tokens through EOS once. Reserve prompts for validation before preparing windows.
- Score with the real mixed distribution. Freeze the exact SFT reference and keep Copy-Paste active in both models. Sum clean, unweighted completion log-probabilities with dropout disabled. Apply NeoLLM's auxiliary losses through the separate chosen-response SFT anchor. With identical policy and reference, the DPO term starts at
ln(2). - Resume and select checkpoints deliberately. Resume the trainable policy from its saved state and keep the original SFT reference. Check preferred and rejected CE alongside the margin. Choose checkpoints using generated answers as well as preference scores. Likelihood displacement in preference optimization
Objective handling in DPO
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.
| Component | Clean pair scoring | Chosen-only SFT anchor on the trainable policy |
|---|---|---|
| Copy-Paste | Active for both replies in both models, with the same structural and chat-header copy masks. Scores use the full vocabulary-plus-pointer distribution. | Active in the clean and MEAP views. The policy's copy head receives gradients from the preference term and the anchor. |
| MiLe | Unweighted token log-probabilities. | Entropy reweighting of the mixed distribution with γ=1.0. |
| μ-loss | Pure sequence likelihood. | Output-matrix mean penalty with λ=1e-4. |
| TWEO | Pure sequence likelihood. | Block-activation outlier penalty on supervised positions with weight 0.01. |
| NITP | Pure sequence likelihood. | One-step prediction of detached shallow states for valid next-token labels, target index 2 and weight 1.0. |
| MEAP | Clean input history and dropout off. | Two views with weights 0.75 clean and 0.25 MEAP. The mask ratio within eligible assistant history is 0.10. |
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.
Data acceptance and debugging
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.
Evaluation and limitations
The diagram's numerical example comes from the extended DPO run, evaluated separately from this 400-step pilot.
| Validation metric | English | Spanish |
|---|---|---|
| Held-out pairs | 32 | 32 |
| Positive reference-relative margin, ties count half | 46.9% | 84.4% |
| DPO loss | 0.6980 | 0.5349 |
| Frozen-reference DPO loss | 0.6931 | 0.6931 |
| Chosen-token CE, SFT → DPO | 2.5995 → 2.6001 | 3.6593 → 3.6903 |
A positive margin means the chosen-to-rejected likelihood ratio increased relative to the SFT reference. Relative preference and absolute likelihood of the chosen completion can move in different directions. The held-out sets are small, and the two languages primarily use different preference datasets, which limits cross-language comparisons.
On 20 separate greedy-generation prompts, DPO produced EOS on 17 and matched zero answers under the exact-output check. The SFT reference had 18 EOS and zero exact matches on the same prompts. Disabling Copy-Paste as an inference ablation yielded 14 EOS and zero exact matches for DPO. Answers often contain extra text or produce the wrong content. These are narrow behavioral probes and the checkpoint is intended for research.
Usage
Load KitsuVp/NeoLLM-Instruct-DPO with trust_remote_code=True using the same chat template and generation example as the SFT model card. We tested with Transformers 5.19.0, PyTorch 2.14.0+cu132, and an RTX 5070 Ti in WSL.
- Downloads last month
- 81



