TS^2 is designed to improve alignment stability and mitigate token-level probability collapse during fine-tuning by incorporating entropy-aware adaptive weighting into the training objective.
More details could check our paper
ICLR 2026 "TS^2: Training with Sparsemax+, Testing with Softmax for Accurate and Diverse LLM Fine-Tuning"
Instead of applying uniform likelihood maximization across all tokens as in standard supervised fine-tuning, this model introduces an adaptive weighting mechanism that dynamically adjusts training emphasis based on predictive entropy.
This design is motivated by observations that overconfident likelihood-based training may lead to:
TS^2 modifies the training objective to improve both accuracy and diversity.
1from transformers import AutoTokenizer, AutoModelForCausalLM
2
3tokenizer = AutoTokenizer.from_pretrained("xzybit/qwen2-7b-ts2")
4
5model = AutoModelForCausalLM.from_pretrained(
6 "xzybit/qwen2-7b-ts2",
7 device_map="auto"
8)