How ezelikman/quiet-star works
Project type and purpose
• This is an open-source research codebase that patches the base Mistral implementation in Huggingface Transformers.
• Its goal is to enable “Quiet-STaR,” a self-reflective thought-token mechanism, by supplying new configuration and modeling files and then training/evaluating the patched model via standard Transformers’ Trainer.
File structure
• Top-level files:
– configuration_mistral.py – custom Config class extending Huggingface’s MistralConfig
– modeling_mistral.py – patched model implementation extending MistralForCausalLM
– quiet-star-train.py – training script that instantiates Trainer, Dataset, model, etc.
– zero-shotcot-eval.py – evaluation script for zero-shot chain-of-thought
– eval_helpers.py – utility functions for data processing and metrics
– README.md, LICENSE
• Key patterns:
– Plugin/monkey-patch style: two new modules override the HF core under transformers/models/mistral
– Standard Trainer pipeline: data → Trainer → patched model → outputs
Extract insights from README
• Emphasizes reproducibility on Transformers v4.37.0.dev0
• Warns about masking start/end thought tokens at inference
• Publishes a pre-trained model on the Huggingface Hub