CoolFace
Modelpublic

whw06/MIRA-Text-Group2

sourceHugging Faceapache-2.0updated 4mo agoView on Hugging Face
1likes18downloads
Model Card

MIRA-Text-Group2

A student scorer from MIRA (Mid-training Rubric Anchoring for Source-Aware Data Selection), fine-tuned to score Chinese identity / algorithm explanation text along a group-specific set of anchor rubric dimensions.

πŸ“„ Paper: MIRA: Mid-training Rubric Anchoring for Source-Aware Data Selection (EMNLP 2026) πŸ’» Code: https://github.com/Multilingual-Multimodal-NLP/mira

TL;DR

MIRA is a source-aware data selection framework for heterogeneous mid-training corpora. Instead of applying a single global quality rubric, MIRA (1) clusters sources into capability-coherent groups, (2) lets a frontier teacher (Kimi-K2.6) freely propose rubric dimensions and anchors them per group, (3) distills the anchored teacher into a lightweight per-group student scorer, and (4) applies reliability-aware aggregation with per-source retention thresholds.

This repository is one of those student scorers β€” variant 2 in the Text family, specialized for Chinese identity / algorithm explanation text. Given an in-distribution record, it produces a numerical score and a short rationale for every anchor dimension in this group's rubric.


Model summary

ArchitectureMixture-of-Experts decoder (35B total / β‰ˆ3B active params)
Base modelQwen3.5-35B-A3B-Base
Fine-tuningFull-parameter SFT on Kimi-K2.6 anchored teacher labels
DomainChinese flat-text identity-guided / algorithm explanation documents β€” purchase_code (distillminimax final round), its first-round counterpart, and `ctcodereasoning`. Strongest intra-group similarity: `purchasecode ↔ purchasecodefirst = 0.959`.
Anchor rubric15 group-specific dimensions (group_C_dim_anchors.jsonl in the project repo)
Source count3 text sources
OutputStructured (score, rationale) per anchor dimension
PrecisionBF16
LicenseApache-2.0 (inherits from Qwen3)

Sources covered

This scorer is calibrated for the following mid-training sources in the Text / Chinese identity + algorithm QA group:

SourceDescription
purchase_codedistill_minimax final-round purchase-code text
purchase_code_first_roundFirst-round counterpart of purchase_code
ct_code_reasoningChinese algorithm problems with worked solutions

The full source-grouping report (KMeans k=4 / 5 clusters, intra-group cosine similarities) is in the project repo.


Anchor dimensions (15 slots)

The scoring rubric for this group, discovered via Kimi-K2.6 free-form judging and clustered into 15 anchor dimensions (KMeans k=15 over the group's dim-score embeddings). Dimensions below are sorted by cluster size β€” larger clusters dominate the corpus and carry more signal. Anchor names are read verbatim from this group's group_C_dim_anchors.jsonl; some names recur across slots because semantically related but distinct rubric facets were clustered separately by the teacher.

SlotDimensionCluster size
A1Reasoning Quality37,321
A2Instruction Following36,571
A3Technical Depth31,723
A4Bug Identification Accuracy25,487
A5Formatting & Structural Clarity25,293
A6Training Utility25,114
A7Language Consistency & Fluency23,793
A8Communication Quality23,322
A9Solution Completeness22,410
A10Practical Actionability21,530
A11Signal-to-Noise Ratio21,469
A12Response Completeness20,253
A13Structural Organization17,329
A14Domain Expertise (Competitive Programming)16,016
A15Safety & Harmlessness13,024

The scorer outputs one [Ai] <dimension>: <score>/10 β€” <rationale> line per slot, plus overall, training_recommendation, domain_tag, and brief.


Where this model fits in the MIRA pipeline

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ 1. Rubric        β”‚  β”‚ 2. Anchored      β”‚  β”‚ 3. Reliability   β”‚  β”‚ 4. Data          β”‚
β”‚    Discovery     β”‚β†’ β”‚    Judge         β”‚β†’ β”‚    Aggregation   β”‚β†’ β”‚    Selection     β”‚
β”‚ (Kimi-K2.6,      β”‚  β”‚    Distillation  β”‚  β”‚ (mask unreliable β”‚  β”‚ (per-source      β”‚
β”‚  free-form       β”‚  β”‚ ◀── THIS MODEL   β”‚  β”‚  srcΓ—dim cells)  β”‚  β”‚  retention)      β”‚
β”‚  judging)        β”‚  β”‚                  β”‚  β”‚                  β”‚  β”‚                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

MIRA-Text-Group2 lives in Stage 2: it scores the full Text / Chinese identity + algorithm QA corpus so that downstream stages can apply reliability masking and source-aware retention.


Intended use

  • β€”Primary: Score Chinese identity / algorithm explanation text on this group's anchor dimensions to drive source-aware data selection and filtering.
  • β€”Secondary: Research on rubric distillation, semantic quality scoring, and reliability diagnostics for heterogeneous training corpora.

Not intended for:

  • β€”General-purpose chat or instruction following β€” fine-tuned to emit structured scores, not freeform dialogue.
  • β€”Single-shot quality judgments without the anchor-dimension prompt template β€” outputs will be miscalibrated.
  • β€”Records outside the Text / Chinese identity + algorithm QA group; use the matching sibling scorer instead.

Deployment

The scorer is designed to be served via vLLM behind an OpenAI-compatible endpoint and called in batch from the MIRA scoring pipeline.

1. Serve with vLLM (recommended)

bash
vllm serve whw06/MIRA-Text-Group2 \
    --tensor-parallel-size 8 \
    --dtype bfloat16 \
    --max-model-len 65536 \
    --max-num-batched-tokens 131072 \
    --gpu-memory-utilization 0.9 \
    --trust-remote-code \
    --port 8000

Why these values (verified on H200 141GB during the paper's per-source evaluation):

  • β€”max-model-len=65536 β€” 2Γ— the mid-training cutoff. Records can hit ~60K tokens for densely-tokenized sources; 40K runs into prompt-overflow errors.
  • β€”max-num-batched-tokens=131072 β€” supports two full-length sequences per scheduling step.
  • β€”gpu-memory-utilization=0.9 β€” 35B BF16 weights take ~70GB, leaving ~57GB KV cache. Roughly 4 concurrent 65K-context sequences per GPU.
  • β€”8-way tensor parallel works well for the 35B MoE on a single 8Γ—H200/A100 node.

2. Call from Python

python
from openai import OpenAI

client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")

resp = client.chat.completions.create(
    model="whw06/MIRA-Text-Group2",
    messages=[
        {"role": "system", "content": SYSTEM_PROMPT},   # group-C anchor calibration
        {"role": "user",   "content": USER_PROMPT},     # record + [A1]..[A15] template
    ],
    temperature=0.7,
    top_p=0.95,
    max_tokens=2048,
)
print(resp.choices[0].message.content)

3. Prompt template

The user message asks for one structured line per anchor dimension (top-15 of this group):

[A1] {anchor_dim_1}: <score>/10 β€” <justification>
[A2] {anchor_dim_2}: <score>/10 β€” <justification>
...
[A15] {anchor_dim_15}: <score>/10 β€” <justification>
overall: <0-100>
training_recommendation: <keep | downsample | drop>
domain_tag: <short tag>
brief: <one-sentence summary>

The system prompt embeds the top-12 anchor calibration references (canonical examples from clustering) so the student matches the teacher's scoring scale. The full prompt builder, anchor JSONL files, and output parser are in the project repo's scoring/score_text_anchored.py.


Training details

TeacherKimi-K2.6 (free-form rubric discovery in Phase 1; anchored re-scoring in Phase 2)
Training dataKimi-K2.6 anchored labels on this group's Phase-2 corpus, split into a distillation set + a held-out validation split for reliability diagnostics
LossStandard next-token CE over (score, rationale) labels for every anchor dimension
HyperparametersHeld constant across all MIRA student scorers; full settings in paper Appendix A.4
ValidationPer-dimension teacher–student MAE and Spearman ρ on a held-out split; dimensions failing reliability thresholds are masked post-hoc (Figure 3 in the paper)

Training loss / step curve is preserved in trainer_state.json for full reproducibility.


Headline results (from the paper)

End-to-end downstream evaluation: Qwen2.5-Coder-14B mid-trained on 25B-token MIRA-selected subsets vs. baselines, then SFT, evaluated on 9 code benchmarks across 4 categories.

MethodCode GenMultiplESQL (EX)SWE-Multi**Macro Avg**
Base + SFT (no mid)53.9172.5764.243.6748.60
Raw Mixture (50B)53.7167.4294.1840.0063.83
Random (25B)52.7171.4491.0335.0063.23
DataMan (25B)53.8271.3893.8433.0063.01
DSIR (25B)48.7467.2695.2027.0059.55
PPL (25B)50.5257.7490.6620.0054.73
MIRA-Global (25B)53.1267.8494.2632.0061.81
MIRA-Group (25B)54.5371.8594.0836.3364.20
MIRA-Source (25B)54.1872.8494.3830.3362.93

MIRA-Group matches the full 50B-token raw mixture while using only half the tokens, and out-performs all 25B-token selection baselines on the macro average. This scorer is one of the 12 student models used by the MIRA-Group variant.


Sibling models

MIRA releases one student scorer per source-group variant. Use the matching scorer for each record's format:


Limitations

  • β€”MIRA addresses source-aware filtering only. Source discovery, mixture-ratio design, curriculum scheduling, deduplication and contamination control remain orthogonal concerns.
  • β€”This scorer is calibrated against the Text / Chinese identity + algorithm QA group; cross-domain transfer is not advised β€” use the matching sibling for other source formats.
  • β€”Some anchor dimensions exhibit high teacher–student MAE and are masked post-hoc during aggregation (see paper Β§3.4). The model still emits scores for masked dimensions; downstream consumers should re-apply the reliability mask from the project repository.
  • β€”Calibrated on 3 sources within this group; behavior on out-of-distribution formats is unverified.

Citation

bibtex
@inproceedings{wang2026mira,
  title     = {MIRA: Mid-training Rubric Anchoring for Source-Aware Data Selection},
  author    = {Wang, Haowen and Du, Yaxin and Yang, Jian and Wu, Jiajun and
               Liu, Shukai and Zhang, Yuxuan and Wang, Pingjie and Chen, Siheng and
               Zheng, Tuney and Zhou, Ming and Liu, Xianglong},
  booktitle = {Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing (EMNLP)},
  year      = {2026}
}

Acknowledgments

Built on Qwen3.5-35B-A3B-Base and the Megatron-LM training stack. Teacher labels generated with Kimi-K2.6.