The following chart compares this method against other training approaches on the same base model:
Training uses a Combined Preference Dataset built via Round-Robin Sampling from three sources:
1from transformers import AutoModelForCausalLM, AutoTokenizer
2from peft import PeftModel
3
4# Load base model
5base_model = AutoModelForCausalLM.from_pretrained("HuggingFaceTB/SmolLM2-360M")
6tokenizer = AutoTokenizer.from_pretrained("HuggingFaceTB/SmolLM2-360M")
7
8# Load adapter
9model = PeftModel.from_pretrained(base_model, "Nishef/SmolLM2-360M-Full_KTO_20251225_020028")
10
11# Generate text
12inputs = tokenizer("Hello, how are you?", return_tensors="pt")
13outputs = model.generate(**inputs, max_new_tokens=100)
14print(tokenizer.decode(outputs[0]))
Kahneman-Tversky Optimization - Binary preference optimization based on Prospect Theory
1@misc{smollm2_360m_kto_2025,
2 title = {SmolLM2-360M Fine-tuned with Kto},
3 author = {Thesis Research},
4 year = {2025},
5 publisher = {HuggingFace},
6 url = {https://huggingface.co/Nishef/SmolLM2-360M-Full_KTO_20251225_020028}
7}
.
├── adapter_config.json # LoRA configuration
├── adapter_model.safetensors # Model weights
├── tokenizer files # Tokenizer configuration
├── eval_summary.csv # Evaluation results
├── thesis_plots/ # Visualization assets
│ ├── benchmark_results.png
│ └── training_loss.png
└── README.md # This file
This model is released under the Apache 2.0 license.