Downloads · 30 days
16
22% of all-time downloads
Haldi247/TinyLlama-DPO-Orca
TinyLlama-DPO-Orca is a text generation model from Haldi247. Use it when you need the model to write or continue text. It is set up for transformers.
This model is the result of a two-stage alignment pipeline applied to the TinyLlama-1.1B base model, utilizing Supervised Fine-Tuning (SFT) followed by Direct Preference Optimization (DPO) to align outputs with human…
Downloads · 30 days
16
22% of all-time downloads
All-time downloads
74
Public
Parameters
1.1B
2.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2.2 GB · 100%
From the Hugging Face model README
This model is the result of a two-stage alignment pipeline applied to the TinyLlama-1.1B base model, utilizing Supervised Fine-Tuning (SFT) followed by Direct Preference Optimization (DPO) to align outputs with human preference data.
This model is intended to be used for text generation and conversational question-answering based on the Orca preference dataset style.
Due to known issues with token collapse, this model is not suitable for production deployment or long-form reliable generation without further prompt engineering or tokenizer alignment.
Known Issue: Token Collapse
During the SFT phase, sequence packing was implemented using add_special_tokens=False to strictly prevent cross-contamination across VRAM blocks. While this optimized memory and isolated sequences, it caused a severe distribution shift away from TinyLlama's pre-trained chat template.
Consequently, during standard inference with the tokenizer's chat template applied, the DPO model experiences catastrophic forgetting and token collapse (frequently outputting loops of |> or < < <). The extremely low BLEU score reflects this formatting mismatch rather than an inability to learn the underlying linguistic representations.
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. Future iterations should harmonize the sequence packing tokenization with the base model's inherent chat structure.
model_id = "Haldi247/TinyLlama-DPO-Orca" tokenizer = AutoTokenizer.from_pretrained(model_id) messages = [{"role": "user", "content": prompt}]
The DPO phase utilized the argilla/distilabel-intel-orca-dpo-pairs dataset. To ensure high-quality preference alignment, the data was rigorously filtered:
status != tie).chosen_score >= 8).not in_gsm8k_train).Final Dataset Size: 5,922 preference pairs.
The model was trained using the trl and peft libraries for Parameter-Efficient Fine-Tuning (PEFT) via LoRA.
bf16=True to prevent gradient underflow)q_proj, k_proj, v_proj, o_projgradient_accumulation_steps=4, resulting in an effective batch size of 16)sdpa)The model was evaluated against a custom set of 10 QA prompts using reference answers.
Performance was measured using linguistic overlap and semantic similarity metrics:
[More Information Needed]
Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
BibTeX:
[More Information Needed]
APA:
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]