Instructions to use JaydeepR/SmolLM-135M-neuraltxt-dpo-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use JaydeepR/SmolLM-135M-neuraltxt-dpo-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="JaydeepR/SmolLM-135M-neuraltxt-dpo-v1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("JaydeepR/SmolLM-135M-neuraltxt-dpo-v1") model = AutoModelForMultimodalLM.from_pretrained("JaydeepR/SmolLM-135M-neuraltxt-dpo-v1") 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 JaydeepR/SmolLM-135M-neuraltxt-dpo-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "JaydeepR/SmolLM-135M-neuraltxt-dpo-v1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JaydeepR/SmolLM-135M-neuraltxt-dpo-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/JaydeepR/SmolLM-135M-neuraltxt-dpo-v1
- SGLang
How to use JaydeepR/SmolLM-135M-neuraltxt-dpo-v1 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 "JaydeepR/SmolLM-135M-neuraltxt-dpo-v1" \ --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": "JaydeepR/SmolLM-135M-neuraltxt-dpo-v1", "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 "JaydeepR/SmolLM-135M-neuraltxt-dpo-v1" \ --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": "JaydeepR/SmolLM-135M-neuraltxt-dpo-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use JaydeepR/SmolLM-135M-neuraltxt-dpo-v1 with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for JaydeepR/SmolLM-135M-neuraltxt-dpo-v1 to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for JaydeepR/SmolLM-135M-neuraltxt-dpo-v1 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for JaydeepR/SmolLM-135M-neuraltxt-dpo-v1 to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="JaydeepR/SmolLM-135M-neuraltxt-dpo-v1", max_seq_length=2048, ) - Docker Model Runner
How to use JaydeepR/SmolLM-135M-neuraltxt-dpo-v1 with Docker Model Runner:
docker model run hf.co/JaydeepR/SmolLM-135M-neuraltxt-dpo-v1
SmolLM-135M-neuraltxt-dpo-v1
Preference-tuned (DPO) version of the SFT'd SmolLM-135M ML-paper research assistant. This is stage 3 of a CPT → SFT → DPO pipeline on a 135M-parameter model.
- Base (SFT):
paperbd/smollm_135M_neuraltxt_v1 - Preference data:
paperbd/paper_preference_150K-v1— pairs mined by sampling the SFT model and ranking responses with an LLM judge. - Method: DPO (Direct Preference Optimization), β=0.1, LoRA r=32, merged to 16-bit.
Training
| Method | DPO (TRL + Unsloth) |
| beta | 0.1 |
| LoRA rank / alpha | 32 / 32 |
| Effective batch | 128 (8 × grad_accum 16) |
| Max seq / prompt length | 1024 / 768 |
| Learning rate | 2e-4, linear decay |
| Epochs | 3 (2,757 steps) |
| Hardware | 1× RTX 3090, ~6h17m |
Evaluation
Held-out 2% split + diversity on 100 sampled prompts (4 responses × 4 temperatures).
| Metric | SFT baseline | This model (DPO) |
|---|---|---|
| Eval loss | — | 0.457 |
| Reward accuracy (held-out) | 0.50 (chance) | 0.72 |
| Reward margin | — | 1.65 |
| Diversity — EAD | 0.1173 | 0.1193 |
| Diversity — SBERT | 0.2263 | 0.2322 |
| Diversity — Vendi | 2.7327 | 2.7410 |
Takeaways: the model learned the preference (reward accuracy 0.50 → 0.72) while preserving output diversity (no mode collapse — all diversity metrics flat vs the SFT baseline). Training shows mild overfitting (train reward accuracy ~0.85 vs eval 0.72), so 3 epochs is the right length.
Intended use & limitations
- Same scope as the SFT base: a structured ML-paper research assistant, not a general chatbot. Best used via the
PaperResearchertask API from the SFT stage. - At 135M parameters the model is capacity-limited — it learns task shape and preference, not deep factual recall. DPO sharpens which response style is preferred; it does not add knowledge.
- The reward/eval accuracy measures agreement with the LLM judge that created the preference data, so it is not a fully independent quality signal.
Reproduce
See dpo/DPO_SmolLM135M (run_dpo.sh, experiments.md, LEARNINGS.md).
- Downloads last month
- 93
Model tree for JaydeepR/SmolLM-135M-neuraltxt-dpo-v1
Base model
HuggingFaceTB/SmolLM-135M