--- language: - en library_name: transformers pipeline_tag: text-generation tags: - mathematics - conjecture-reasoning - deepseek-math - lora base_model: - deepseek-ai/deepseek-math-7b-instruct - deepseek-ai/deepseek-math-v2 datasets: - NorthernTribe-Research/math-conjecture-training-corpus --- # NorthernTribe-Research/math-conjecture-model An autonomous DeepSeek-Math training and evaluation stack that powers multi-stage Space GPU fine-tuning, quality-gated adapter promotion, and reproducible publishing to your Hugging Face model repository. This folder contains the autonomous training/evaluation stack used by the Space and local runs. ## Included - `configs/deepseek_math.yaml`: DeepSeek-Math baseline preset - `configs/deepseek_math_v2.yaml`: DeepSeek-Math-V2 baseline preset - `configs/deepseek_math_sota.yaml`: 4-stage SOTA curriculum + post-eval + quality gate - `scripts/train_sft.py`: single-stage LoRA/QLoRA SFT - `scripts/train_sota.py`: staged weighted curriculum with autonomous post-eval and gated push - `scripts/eval_sota.py`: pass@k + exact/boxed + family/difficulty metrics - `scripts/merge_and_push.py`: optional adapter merge into full model weights ## Setup ```bash .venv/bin/python -m pip install -r model_development/requirements.txt ``` ## Run SOTA curriculum ```bash .venv/bin/python model_development/scripts/train_sota.py \ --config model_development/configs/deepseek_math_sota.yaml ``` Optional controls: ```bash # Validate stages only .venv/bin/python model_development/scripts/train_sota.py \ --config model_development/configs/deepseek_math_sota.yaml \ --dry-run # Force skip quality gate for one run .venv/bin/python model_development/scripts/train_sota.py \ --config model_development/configs/deepseek_math_sota.yaml \ --skip-quality-gate ``` ## Evaluate adapters ```bash .venv/bin/python model_development/scripts/eval_sota.py \ --config model_development/configs/deepseek_math_sota.yaml \ --adapter-path model_development/runs/math-conjecture-sota/final_adapter \ --eval-file data/releases/v1/test.parquet \ --k 6 \ --max-samples 240 ``` ## Outputs - final adapter: `model_development/runs/math-conjecture-sota/final_adapter` - training summary: `model_development/runs/math-conjecture-sota/training_summary.json` - post-eval report: `model_development/runs/math-conjecture-sota/post_eval_report.json` ## Quality gate behavior When enabled in config/runtime: - validates minimum evaluation coverage - enforces `pass@1` / `pass@k` thresholds - enforces required family-level `pass@k` thresholds - can enforce max final stage `eval_loss` - blocks hub push if gate fails ## Auth Hub auth resolves from environment first (`HF_TOKEN` / `HUGGINGFACE_HUB_TOKEN`) and can fall back to `huggingface-api-key.json`.