Fine-tuning Qwen 3 4B Base on 100 zebra puzzles yielded +31% on MATH-500. 6.5-min (Single H100/H200) reproduction notebook included.
Summary
Fine-tuning small AI models on logic puzzles derived from zebra puzzles yields significant improvements in math benchmarks like MATH-500, with open-source resources and notebooks for reproduction.
View Cached Full Text
Cached at: 09/11/26, 02:33 PM
Eliciting Reasoning with 100-500 Zebra Puzzles
Source: https://huggingface.co/blog/tamewild/pcss Resources & Quick Links:
- Read this Post:HuggingFace (Rendered Blog)|GitHub (Markdown Source)
- GitHub Repository:tamewild/pcss
- Reproduction Notebooks (Single H100/H200):Qwen 3 4B(~6.5 mins) |Granite 4.1 3B(~23 mins) |Qwen 3.5 9B(~40 mins)
- Models:PCSS-Qwen3-4B|PCSS-Granite-4.1-3B|PCSS-Qwen3.5-9B
- Datasets:zebra_100|instruct5
https://huggingface.co/blog/tamewild/pcss#1-introduction1. Introduction
Encountering the research on theHyperfitting Phenomenonsparked an interest in exploring how pre-trained base models behave when micro-datasets are fine-tuned to near-zero training loss. We focused on training small pre-trained base models on100 to 500 pure logic deduction traces (specifically 5x5 zebra puzzles)withzero mathematical data in the fine-tuning dataset. This synthetic dataset was generated byQwen3-235B-A22B-Instruct-2507in September 2025 using rejection sampling.
Across multiple model families and architectures:
- Qwen 3 4B Basefine-tuned on100 zebra puzzles(~6.5 minutes on 1 GPU) reaches85.26% on the full 5,000-problem MATH benchmark(+31.16% delta over base) and21.67% on AIME 2025, rivaling the official post-trained model in non-thinking mode on MATH-500 while outperforming it on AIME 2025.
- Granite 4.1 3B Basefine-tuned on500 zebra puzzlesachieves77.73% on MATH-500and19.44% on AIME 2025, outperforming the official IBM Granite 4.1 3B Instruct model (+11.13 and +12.77 percentage points, respectively).
- Qwen 3.5 9B Basefine-tuned on500 zebra puzzlesjumps from 17.00% to80.50% on 5x5 zebra puzzles(Pass@3:97.05%), while jumping from 5.42% to22.92% on the uncontaminated ArXivMath 05/26 benchmark(Pass@3:34.88%) and reaching96.60% on MATH-500and60.67% on AIME 2025.
While this out-of-domain generalization appears primarily driven by the pure logic dataset, we chose to manage the optimization process through adaptive loss scaling. For our primary results, we utilizedPCSS (Per-Example Calibrated Sigmoid Scaler): an adaptive, data-aware loss scaler derived directly from KTO.
https://huggingface.co/blog/tamewild/pcss#2-the-mathematics-of-pcss2. The Mathematics of PCSS
https://huggingface.co/blog/tamewild/pcss#21-from-preference-optimization-to-a-dynamic-sft-scaler2.1 From Preference Optimization to a Dynamic SFT Scaler
PCSS originates fromKTO. But why adapt an alignment algorithm for Supervised Fine-Tuning?
The inspiration came from an experiment in the original KTO paper (Table 4). The authors demonstrated that running KTO usingonlydesirable/positive examples (the exact same unpaired data used for SFT) yielded results highly competitive with standard SFT. While the paper conservatively notes this setup “yields similar results to SFT whenβ\betais small,” the results withβ=0.1\beta=0.1raised the overall average benchmark score from 29.7% to 31.1%, driven by a substantial relative increase on the GSM8K mathematical reasoning benchmark (from 1.0% to 12.5%).
Why does an alignment algorithm behave this way? We can answer this by performing a gradient analysis on standard KTO when applied to purely desirable data.
Setting the gain sensitivity to 1(λD=1)(\lambda_D = 1), the KTO loss for a desirable ground-truth sequencey∗y^*is:LKTO(θ)=1−σ(β(rθ(x,y∗)−z0))\mathcal{L}_{\text{KTO}}(\theta) = 1 - \sigma(\beta(r_\theta(x, y^*) - z_0))whererθ(x,y)r_\theta(x, y)is the unnormalized log ratio(logπθ(y∣x)−logπref(y∣x))(\log \pi_\theta(y|x) - \log \pi_{\text{ref}}(y|x)). The loss for the ground-truth sequence is evaluated atrθ(x,y∗)r_\theta(x, y^*), andz0z_0is the KL divergence estimate. Crucially, KTO explicitlydoes not backpropagate throughz0z_0.
Taking the gradient with respect toθ\theta:∇θLKTO(θ)=−σ′(β(rθ(x,y∗)−z0))⋅β⋅∇θrθ(x,y∗)\nabla_\theta \mathcal{L}_{\text{KTO}}(\theta) = -\sigma’(\beta(r_\theta(x, y^*) - z_0)) \cdot \beta \cdot \nabla_\theta r_\theta(x, y^*)Because the reference model is frozen,∇θrθ(x,y∗)=∇θlogπθ(y∗∣x)\nabla_\theta r_\theta(x, y^*) = \nabla_\theta \log \pi_\theta(y^*|x). Since the standard SFT lossLsft(θ)L_{\text{sft}}(\theta)is the negative mean log-probability overNNtokens,logπθ(y∗∣x)=−N⋅Lsft(θ)\log \pi_\theta(y^*|x) = -N \cdot L_{\text{sft}}(\theta). Therefore,∇θlogπθ(y∗∣x)=−N⋅∇θLsft(θ)\nabla_\theta \log \pi_\theta(y^*|x) = -N \cdot \nabla_\theta L_{\text{sft}}(\theta).
Substituting this back in gives the exact gradient update for standard KTO on positive data:∇θLKTO(θ)=[β⋅σ′(β(rθ(x,y∗)−z0))⋅N]∇θLsft(θ)\nabla_\theta \mathcal{L}_{\text{KTO}}(\theta) = \Big[ \beta \cdot \sigma’(\beta(r_\theta(x, y^*) - z_0)) \cdot N \Big] \nabla_\theta L_{\text{sft}}(\theta)
When you apply KTO to purely desirable examples, it is no longer performing preference alignment against negative data. Instead, it mathematically reduces tothe standard SFT gradient multiplied by a dynamic scaler.
However, this same equation highlights why standard KTO would struggle on logic chains spanning up to 11,000+ tokens:
- **Length-Induced Gradient Inflation:**The scaler is multiplied by the sequence lengthNN. For long traces, the gradient magnitude increases sharply by a factor of hundreds.
- **Length Bias & Gradient Saturation:**Becauserθ(x,y∗)r_\theta(x, y^*)is an unnormalized sum, its magnitude also scales linearly withNN, quickly saturating the sigmoid. The derivativeσ′\sigma’drops toward zero, which would cause the optimizer to prematurely stop learning on long sequences.
To convert this mechanism into the stable PCSS scaler, we make two fundamental mathematical transformations:
https://huggingface.co/blog/tamewild/pcss#transformation-1-sequence-length-normalizationTransformation 1: Sequence-Length Normalization
PCSS explicitly normalizes the implied reward by sequence length using standard mean cross-entropy losses (whereN=∣y∗∣N = |y^*|):
- Current model SFT loss:Lsft(θ)=−1N∑t=1Nlogπθ(yt∗∣x,y<t∗)L_{\text{sft}}(\theta) = -\frac{1}{N}\sum_{t=1}^{N} \log \pi_\theta(y_t^* \mid x, y_{<t}^*)
- Frozen base model reference loss:Lref=−1N∑t=1Nlogπref(yt∗∣x,y<t∗)L_{\text{ref}} = -\frac{1}{N}\sum_{t=1}^{N} \log \pi_{\text{ref}}(y_t^* \mid x, y_{<t}^*)
The normalized reward becomes the difference:rnorm=Lref−Lsft(θ)r_{\text{norm}} = L_{\text{ref}} - L_{\text{sft}}(\theta).
https://huggingface.co/blog/tamewild/pcss#transformation-2-dropping-the-kl-anchor-katexparse36markerTransformation 2: Dropping the KL Anchor(z0=0)(z_0 = 0)
The canonical KTO value function includesz0z_0as a baseline expectation(z0=Ey∼πθ(⋅∣x)[rθ(x,y)])(z_0 = \mathbb{E}_{y \sim \pi_\theta(\cdot|x)}[r_\theta(x, y)]).
While KTO’s batch-dependentz0z_0estimate breaks down atbsz=1bsz=1, mathematical analysis indicates thatif we want the scaler to natively decay upon mastery in SFT, dropping the dynamic KL anchor is a straightforward architectural adjustment, makingz0norm=0z_0^{\text{norm}} = 0a natural design choice.
During fine-tuning on a ground-truth logic trace(y∗)(y^*), the policy’s probability mass concentrates entirely on the correct answer(πθ(y∗∣x)→1)(\pi_\theta(y^*|x) \to 1). If we plug this mastered state back into the formal sequence-normalized definition ofz0z_0:z0norm=∑yπθ(y∣x)[1∣y∣logπθ(y∣x)−1∣y∣logπref(y∣x)]≈Lrefz_0^{\text{norm}} = \sum_y \pi_\theta(y|x) \Big[ \frac{1}{|y|} \log \pi_\theta(y|x) - \frac{1}{|y|} \log \pi_{\text{ref}}(y|x) \Big] \approx L_{\text{ref}}
Upon convergence(Lsft(θ)→0)(L_{\text{sft}}(\theta) \to 0), the reward isrnorm=Lref−Lsft(θ)≈Lrefr_{\text{norm}} = L_{\text{ref}} - L_{\text{sft}}(\theta) \approx L_{\text{ref}}. If we kept the baseline anchor(z0norm)(z_0^{\text{norm}}), the advantage would evaluate to:Advantage=rnorm−z0norm≈Lref−Lref=0\text{Advantage} = r_{\text{norm}} - z_0^{\text{norm}} \approx L_{\text{ref}} - L_{\text{ref}} = 0
Because the derivative of the sigmoid(σ′)(\sigma’)reaches its peak value at an input of exactly00, keeping the baseline anchor(z0norm)(z_0^{\text{norm}})would cause the scaler totrend back toward its maximum value at the end of training, failing to suppress residual gradients and increasing the risk of late-stage overfitting.
By explicitly settingz0norm=0z_0^{\text{norm}} = 0, the advantage becomes an absolute measure of progress against the base model(Lref−Lsft(θ))(L_{\text{ref}} - L_{\text{sft}}(\theta)). Upon mastery(Lsft(θ)→0)(L_{\text{sft}}(\theta) \to 0), the advantage becomes strictly positive(Lref)(L_{\text{ref}}). The scalerstructurally decays toward zero as mastery increases, naturally suppressing residual gradients to help mitigate late-stage overfitting.
https://huggingface.co/blog/tamewild/pcss#the-resulting-gradientThe Resulting Gradient
The PCSS loss for a chosen example becomes:Lchosen(θ)=1−σ(β⋅rnorm)\mathcal{L}_{\text{chosen}}(\theta) = 1 - \sigma(\beta \cdot r_{\text{norm}})∇θLchosen(θ)=[β⋅σ′(β⋅rnorm)]∇θLsft(θ)\nabla_\theta \mathcal{L}_{\text{chosen}}(\theta) = \Big[ \beta \cdot \sigma’(\beta \cdot r_{\text{norm}}) \Big] \nabla_\theta L_{\text{sft}}(\theta)
Because this gradient mathematically reduces to the standard SFT gradient scaled by a dynamic multiplier, we can implement it directly by scaling the standard SFT loss output by the detached multiplier:LPCSS(θ)=Lsft(θ)⋅detach(β⋅σ′(β⋅rnorm))\mathcal{L}_{\text{PCSS}}(\theta) = L_{\text{sft}}(\theta) \cdot \text{detach}(\beta \cdot \sigma’(\beta \cdot r_{\text{norm}}))
https://huggingface.co/blog/tamewild/pcss#22-standard-deviation-normalization–decoupled-scaling2.2 Standard Deviation Normalization & Decoupled Scaling
To standardize the dynamic multiplier across model families and decouple its magnitude from its shape,PCSSapplies two scaling adjustments:
- Scaled Advantage:a=Lref−Lsft(θ)sglobala = \frac{L_{\text{ref}} - L_{\text{sft}}(\theta)}{s_{\text{global}}}, wheresglobal=StdD(Lref)s_{\text{global}} = \text{Std}_{\mathcal{D}}(L_{\text{ref}})is the pre-computed standard deviation of reference losses across the training split.
- Decoupled Peak Scaling:Scale(a)=peak_scale⋅(4.0⋅σ′(β⋅a))\text{Scale}(a) = \text{peak\_scale} \cdot (4.0 \cdot \sigma’(\beta \cdot a))
Sincemax(4.0⋅σ′)=1.0\max(4.0 \cdot \sigma’) = 1.0,peak\_scaledirectly defines the maximum multiplier applied to the SFT gradient.
Applying these scaling adjustments, the programmatic PCSS loss becomes:LPCSS(θ)=Lsft(θ)⋅detach(Scale(a))\mathcal{L}_{\text{PCSS}}(\theta) = L_{\text{sft}}(\theta) \cdot \text{detach}(\text{Scale}(a))
https://huggingface.co/blog/tamewild/pcss#23-the-integrated-objective2.3 The Integrated Objective
While PCSS is implemented by scaling the standard SFT loss with a detached multiplier, this mechanism is not an arbitrary gradient heuristic. Since the gradient of our implementation with respect toθ\thetaisScale(a)⋅∇θLsft(θ)\text{Scale}(a) \cdot \nabla_\theta L_{\text{sft}}(\theta), we can find the antiderivative ofScale(a)\text{Scale}(a)with respect toLsftL_{\text{sft}}to recover the exact integrated objective being optimized (choosing the constant of integration to match the1−σ(…)1 - \sigma(\dots)form of the original KTO objective):
Lintegrated(θ)=peak_scale⋅4.0⋅sglobalβ[1−σ(βLref−Lsft(θ)sglobal)]\mathcal{L}_{\text{integrated}}(\theta) = \text{peak\_scale} \cdot \frac{4.0 \cdot s_{\text{global}}}{\beta} \Bigg[ 1 - \sigma\Bigg(\beta \frac{L_{\text{ref}} - L_{\text{sft}}(\theta)}{s_{\text{global}}}\Bigg) \Bigg]
By anchoring the constant of integration to KTO’s baseline, this explicit form demonstrates that PCSS preserves the exact functional shape of the original objective (the core1−σ(…)1 - \sigma(\dots)). More importantly, it reveals how standard deviation normalization and decoupled peak scaling scale the overall magnitude of the loss surface by a factor ofpeak_scale⋅4.0⋅sglobalβ\text{peak\_scale} \cdot \frac{4.0 \cdot s_{\text{global}}}{\beta}.
https://huggingface.co/blog/tamewild/pcss#24-optimizer-dynamics–hyperparameters2.4 Optimizer Dynamics & Hyperparameters
To accommodate training with an effective batch size of 1, we apply the constant token half-life scaling heuristic from recentsmall-batch training researchto mitigate the rapid decay of AdamW’s second moment estimate. Scaling a baselineβ2=0.999\beta_2=0.999from batch size 16 down to batch size 1 yields:β2(1/16)≈0.99994\beta_2^{(1/16)} \approx 0.99994
Across all PCSS experiments, we fix:
- Effective Batch Size: 1
- Optimizer: 8-bit AdamW
- Epochs: 5
- Scheduler: Constant learning rate with 1-epoch linear warmup
- Weight Decay:
0\.01 - β2\beta_2Parameter:
0\.99994 - PCSS Parameters:β=0.65\beta = 0.65,peak_scale=5.0\text{peak\_scale} = 5.0
- MiSS Parameter:r=512r=512
https://huggingface.co/blog/tamewild/pcss#25-preliminary-multi-token-prediction-mtp-extension2.5 Preliminary Multi-Token Prediction (MTP) Extension
For modern foundation architectures that incorporate native Multi-Token Prediction (such as dense Qwen 3.5 models, which iteratively unroll an MTP decoder layer across speculative steps), PCSS can be extended to jointly govern both the primary next-token prediction and subsequent look-ahead steps.
For the Qwen 3.5 9B experiments in this post, we utilized a preliminary formulation with a single speculative step(k=1)(k=1), computing independent scalers for each prediction step:a0=Lref(0)−Lsft(0)(θ)sglobal(0),a1=Lref(1)−Lsft(1)(θ)sglobal(1)a_0 = \frac{L_{\text{ref}}^{(0)} - L_{\text{sft}}^{(0)}(\theta)}{s_{\text{global}}^{(0)}}, \quad a_1 = \frac{L_{\text{ref}}^{(1)} - L_{\text{sft}}^{(1)}(\theta)}{s_{\text{global}}^{(1)}}LMTP-PCSS(θ)=12[Lsft(0)(θ)⋅detach(Scale(a0))+Lsft(1)(θ)⋅detach(Scale(a1))]\mathcal{L}_{\text{MTP-PCSS}}(\theta) = \frac{1}{2} \left[ L_{\text{sft}}^{(0)}(\theta) \cdot \text{detach}(\text{Scale}(a_0)) + L_{\text{sft}}^{(1)}(\theta) \cdot \text{detach}(\text{Scale}(a_1)) \right]
While treating the single speculative step independently performed well for Qwen 3.5 9B, it remains an initial exploration. Scaling to deeper speculative horizons(k>1)(k > 1)introduces optimization challenges for independent scalers.
We plan to address these limitations and propose a more generalized approach in a future post.
https://huggingface.co/blog/tamewild/pcss#3-empirical-results3. Empirical Results
All training runs were conducted on vast.ai instances with a single H200 NVL GPU. Unless otherwise noted, models were evaluated on their zero-shot Chain-of-Thought (CoT) capabilities with 16,384 max completion tokens via a pinned version of vLLM (0.19.1).
Evaluation Notes: - **Exploratory Runs:**Results represent exploratory single-seed training runs; score differences between configurations should not be taken as definitive conclusions. - **Multiple Generations:**To account for natural sampling stochasticity as well as vLLM’s runtime batching non-determinism (which affects even greedy decoding), most benchmarks were evaluated by drawing multiple generations per problem (e.g.,3×3\timeson GPQA Diamond, and6–10×6\text{–}10\timeson AIME). Single generations were used only when the evaluation set was large enough to provide natural stability (e.g., full MATH, MMLU Redux, and MATH-500 for certain ablations). - **Pass@3:**Reported only for benchmarks with at leastn≥2kn \ge 2k(n≥6)(n \ge 6)generations per question.
https://huggingface.co/blog/tamewild/pcss#31-qwen-3-4b-base-models–ablations3.1 Qwen 3 4B Base Models & Ablations
Our fine-tuned models were evaluated using greedy decoding with 16,384 max completion tokens. Scores for the official post-trained and base models are self-reported figures taken directly from the Qwen 3 Technical Report.
https://huggingface.co/blog/tamewild/pcss#headline-performance-100-zebra-puzzlesHeadline Performance (100 Zebra Puzzles)
Model & Training ConfigTrain TimeMATH-500Full MATH (5,000)AIME 20254x4 Zebra5x5 ZebraQwen 3 4B Base (PCSS + MiSS) 100 zebra, LR=5e-606:2384.60%85.26%*(+31.16% delta)***21.67%****31.67%****4.33%**Qwen 3 4B Official Post-Trained (Reported, Non-Thinking Mode)—84.80%—19.10%——Qwen 3 4B Base (Reported Baseline)0:00—54.10%(4-shot)———
https://huggingface.co/blog/tamewild/pcss#100-sample-ablation-matrix-qwen-3-4b-base100-Sample Ablation Matrix (Qwen 3 4B Base)
The configurations evaluated below share the following default hyperparameters:
- **Shared Settings:**5 epochs, 1-epoch linear warmup, 8-bit AdamW optimizer.
- **PEFT Defaults:**LoRA usesr=512r=512,α=512\alpha=512, learning rate9×10−59\times 10^{-5}. MiSS usesr=512r=512.
- **Optimizer(β2)(\beta_2):**0.999940.99994forbsz=1bsz=1, and0.9990.999forbsz=16bsz=16.
ConfigurationSchedule & Batch SizePEFTTrain TimeMATH-500AIME 20254x4 Zebra5x5 ZebraPCSS + MiSSConstant LR, bsz=1MiSS06:23**84.60%****21.67%**31.67%4.33%PCSS + LoRAConstant LR, bsz=1LoRA07:0283.07%16.67%59.00%**11.00%****LoRA bsz=1 (Cosine)**Cosine Decay, bsz=1LoRA07:2781.60%15.00%59.67%—**LoRA bsz=1 (Constant)**Constant LR, bsz=1LoRA07:3379.80%13.33%37.67%—**LoRA bsz=16 (Cosine)**Cosine Decay, bsz=16LoRA08:1779.40%16.67%23.67%— (Note: Training times were recorded on individual vast.ai H200 instances across TRL and custom trainer setups; minor variations within 6–8 minutes reflect framework callbacks and host instance differences. Forbsz=16bsz=16, a micro-batch size of 16 required gradient checkpointing to fit in VRAM, whereas reaching the same effective batch size via gradient accumulation would roughly equalize speed).
**Ablation Takeaway:**Across all tested configurations—including standard batch size 16 with cosine decay—MATH-500 performance consistently approached or exceeded 80%, suggesting that reasoning generalization from pure logic traces is robust across different training setups rather than dependent on a single hyperparameter configuration.
https://huggingface.co/blog/tamewild/pcss#32-granite-41-3b-base-500-zebra-puzzles3.2 Granite 4.1 3B Base (500 Zebra Puzzles)
Evaluated with greedy decoding:
Model & Training ConfigTrain TimeMATH-500AIME 20255x5 ZebraGranite 4.1 3B Base (PCSS + MiSS) 500 zebra, LR=5e-623:4177.73%*(+11.13%)19.44%(+12.77%)***20.00%**Granite 4.1 3B Official Instruct Full post-training pipeline—66.60%6.67%—
**Granite Delimiters & Template Ablation:**During exploratory evaluations of Granite 4.1 3B Base, we observed that performance appeared sensitive to the string
<extra\_id\_1\>. We compared two fine-tuning configurations: one using the generic chat template from our Qwen runs, and another adapted to use<extra\_id\_1\>Userand<extra\_id\_1\>Assistant. Despite<extra\_id\_1\>being processed as standard text tokens rather than a special control token, the run formatted with these delimiters demonstrated slightly better loss convergence and higher downstream accuracy. This is the primary checkpoint reported in the table above.
https://huggingface.co/blog/tamewild/pcss#33-qwen-35-9b3.3 Qwen 3.5 9B
Chat Template Pre-training Note:Qwen 3.5 9B Basewas released with its chat template control tokens (e.g.,
<\|im\_start\|\>,<\|im\_end\|\>) explicitly pre-trained “to allow efficient LoRA-style PEFT with the official chat template.” Applying this template allowed us to evaluate the untrained base, our fine-tuned checkpoint, and the official post-trained model directly in non-thinking mode for strict comparability.
Evaluated with sampled decoding (T=1.0,top_p=0.95,top_k=20T=1.0, \text{top\_p}=0.95, \text{top\_k}=20, withpresence\_penalty=1\.5for the official post-trained model, as recommended by Qwen):
Model & Training ConfigTrain TimeMATH-500AIME 2025AIME 2026GPQA Diamond5x5 ZebraArXivMath 05/26Qwen 3.5 9B Base (PCSS + MiSS) 500 zebra, LR=5e-640:2196.60%60.67% (Pass@3: 75.58%)64.33% (Pass@3: 75.50%)71.04%80.50% (Pass@3:97.05%)22.92% (Pass@3:34.88%)Qwen 3.5 9B Official Post-Trained Full post-training pipeline—**97.40%**60.56% (Pass@3:77.50%)69.44% (Pass@3:84.67%)**79.63%**48.00%24.17% (Pass@3: 31.87%)Qwen 3.5 9B Base (Untrained) 0 steps baseline0:0093.53%49.44% (Pass@3: 61.83%)50.00% (Pass@3: 65.50%)61.11%17.00%5.42% (Pass@3: 12.00%)
https://huggingface.co/blog/tamewild/pcss#34-token-length–repetition-analysis-qwen-35-9b3.4 Token Length & Repetition Analysis (Qwen 3.5 9B)
To better understand the structural generation dynamics accompanying these performance gains—specifically regarding inference length and repetition failure modes—we measured completion lengths and looping rates.
https://huggingface.co/blog/tamewild/pcss#math-500-completion-token-lengthsMATH-500 Completion Token Lengths
Token counts were calculated using the Qwen 3.5 tokenizer on MATH-500 generation outputs:
ModelMedian TokensAverage TokensMax TokensBase Model (Untrained)806.502,501.7116,386Official Post-Trained891.501,765.0616,384PCSS Fine-Tuned****682.002,029.2316,384 Despite training exclusively on long-form logic traces (with many spanning up to 11,000+ tokens), the PCSS fine-tuned Qwen 3.5 9B model exhibits a shorter median completion length on MATH-500 than both its untrained base model and the official post-trained model.
https://huggingface.co/blog/tamewild/pcss#greedy-gpqa-diamond-looping-ratesGreedy GPQA Diamond Looping Rates
To evaluate repetition failure modes without stochastic sampling variance, models were evaluated under greedy decoding on GPQA Diamond. Repetition loops were detected using Liquid AI’santidoominner-repetition detection heuristic:
Model (Greedy GPQA Diamond)Looping SamplesLooping Rate**Qwen 3.5 9B Base (Untrained)**36 / 5946.06%Qwen 3.5 9B Official Post-Trained31 / 5945.22%Qwen 3.5 9B Base (PCSS Fine-Tuned)4 / 5940.67%
https://huggingface.co/blog/tamewild/pcss#model-dependent-generation-behaviorsModel-Dependent Generation Behaviors
The structural shifts and repetition reductions observed here should not be viewed as universal features of this training process. Exploratory runs indicate that different base model families internalize and generalize from these logic traces in substantially different ways—some models contract their output, while others expand it. Furthermore, although longer sequences inherently provide more opportunities for repetition, a model’s underlying susceptibility to looping can shift in ways that are not strictly tied to generation length. Because this analysis is not exhaustive, even the specific dynamics of Qwen 3.5 9B may vary across different reasoning tasks. While these initial results suggest its performance leap does not strictly rely on pure inference scaling and it reduces repetitive loops on GPQA Diamond, generation behaviors remain complex and highly model-dependent.
https://huggingface.co/blog/tamewild/pcss#4-conclusion4. Conclusion
Our exploratory runs highlight two distinct takeaways for post-training base models:
- **Impact of Pure Logic Micro-Datasets:**In these exploratory runs, the primary driver of performance appears to be the data itself. Fine-tuning on as few as 100 pure logic deduction traces (zebra puzzles) can elicit substantial out-of-domain reasoning generalization, enabling small base models to match or outperform multi-stage instruct models on competitive mathematics benchmarks.
- Data-Aware Optimization (PCSS):While standard SFT is capable of eliciting this generalization, shifting from static time-based learning rate decay to data-aware loss calibration viaPCSSprovides a principled optimization mechanism.
Ultimately, fine-tuning on these micro-datasets—whether through standard SFT or an adaptive loss scaler like PCSS—can provide a highly efficient way to elicit a base model’s latent reasoning capabilities. Since training on these logic traces with PCSS appears to rapidly approximate the reasoning performance of a fully post-trained model, it may offer practical utility beyond standard alignment. For researchers evaluating pre-trained models, this methodology could potentially serve as an efficient evaluation proxy—providing a fast, low-cost way to gauge downstream reasoning performance without the need to run extensive post-training pipelines.
Similar Articles
Need a second pair of eyes, this Qwen3.6 27B quant recipe consistently thinks less and is correct
The author shares a quantization recipe for Qwen3.6 27B that makes the model use significantly fewer thinking tokens while still producing correct answers, leading to faster inference on math benchmarks.
@cjzafir: Qwen 3.5 4B model and 8B are too good. I fine-tuned a 4B model today and got 98% accuracy on full precision and Q8 quan…
A developer reports achieving high accuracy with fine-tuned Qwen 3.5 4B and 8B models using Unsloth, suggesting a shift towards specialized Expert Language Models (ELMs) for niche tasks.
@xdotli: my friend @xeophon thinks coding is solved here's validation that a 3b model is trained with focus on algo efficiency a…
Nanbeige 4.1, a 3B model, outperforms Qwen3-30b-A3b and Qwen 3.5 4b in coding tasks with focus on algorithmic efficiency, achieving long horizon tasks with 600+ tool calls.
I asked 3 Qwen 3.8 models to solve recent AtCoder problems at 4 thinking efforts
A community member benchmarked three Qwen 3 quantized models (Flash, Swift, 27B) at four thinking effort levels on 14 recent AtCoder problems, finding that higher thinking effort rarely improves results and mainly increases token-capped failures, with Flash IQ3_S emerging as the best speed-accuracy compromise.
My fine-tuned 230M model matched Qwen3.5-35B-A3B on a 3-turn SQLite Bash benchmark (17/50, 10/50 strict)
A developer shows that fine-tuning the tiny LFM2.5-230M on 5,000 verified 3-turn Portuguese tool-use conversations let it tie Qwen3.5-35B-A3B (17/50) and beat it on strict passes (10 vs 9) on a SQLite+Bash agent benchmark, suggesting high-quality SFT can substitute for RL when the teacher outpaces the student.