--- license: apache-2.0 base_model: Qwen/Qwen3-8B-Base tags: - code - reasoning - lora-merged - livecodebench pipeline_tag: text-generation library_name: transformers --- # code-think-q8b-20260908 Research checkpoint: **Qwen/Qwen3-8B-Base** (`49e3418fbbbca6ecbdf9608b4d22e5a407081db4`) after V4 LoRA SFT on Qwen3-30B-A3B-Thinking-2507 traces, then merged to full weights. This is a **research checkpoint, not a product**. Single-seed diagnostic numbers only. Do not treat DEV256 as a leaderboard claim. License: **Apache-2.0**, inherited from [Qwen/Qwen3-8B-Base](https://huggingface.co/Qwen/Qwen3-8B-Base) (verified from the local base `README.md`; Apache-2.0 text bundled from the Qwen3-4B-Base `LICENSE` file on disk). ## Base, teacher, and data | | | |---|---| | Student | `Qwen/Qwen3-8B-Base` revision `49e3418fbbbca6ecbdf9608b4d22e5a407081db4` | | Teacher | `Qwen/Qwen3-30B-A3B-Thinking-2507` traces (V4 paired think payload) | | Problems | **4715** unique problems (`source_1ep_rows`); physical 2-epoch concat = **9430** rows | | Dose | **32,436,894** assistant tokens / epoch; endpoint **64,873,788** assistant tokens (2 epochs) | | Train seed | **42** | ## Recipe - LoRA **r64 / α128**, dropout 0.0, seven projections: `q_proj`, `k_proj`, `v_proj`, `o_proj`, `gate_proj`, `up_proj`, `down_proj` - Embeddings / `lm_head` frozen except **two-sided trainable B-rows** for **151643** (`<|endoftext|>`), **151667** (``), **151668** (``). Token ids from `adapter/TOKEN_ROWS_META.json`. - Assistant supervised tail: `<|endoftext|>` (**151643**) - LR **1e-4**, AdamW (β 0.9/0.95), **cosine** over assistant-token dose, **warmup 6%** (3,892,427 / 64,873,788 tokens), weight decay **0.1** - **bf16**, no packing, no truncation, context 32768 - **2 epochs**, physical concat. Endpoint-only score; no checkpoint picking. Merged weights are the 2-epoch endpoint (`step-000921`, 64,873,788 assistant tokens). LoRA + B-rows are under `adapter/`. ## Evaluation (DEV256) 256-problem LiveCodeBench-derived **dev** split. Seed **3407**, **think** mode, **no `` prefill**, max generation ~32k, sandbox-verified **pass@1**. Temperature 0.6, top-p 0.95, top-k 20. **Cap** = generations that hit the 32k length limit without closing ``. | Model | pass@1 | Cap | Notes | |---|---:|---:|---| | **code-think-q8b-20260908** | **81/256** | **130** | this repo; seed 3407; V4 think contract | | Qwen3-8B-Base | 55/256 | — | **old-contract** historical bare-base number (not a same-contract V4 think-mode re-eval; a same-contract 8B-base think COMPLETE.json was not on disk) | Single seed. These are research checkpoints, not product scores. For context, the same-family 4B base on the **current** V4 think contract is 63/256 (seed 3407), with a 5-seed band 55.2 ± 4.9 on an earlier bare-base protocol. ## Usage Merged full weights; no PEFT required at inference. Think mode: `enable_thinking=True`, **do not** prefill ``. ```python from transformers import AutoModelForCausalLM, AutoTokenizer repo = "modrill/code-think-q8b-20260908" tokenizer = AutoTokenizer.from_pretrained(repo) model = AutoModelForCausalLM.from_pretrained( repo, torch_dtype="bfloat16", device_map="auto" ) system = ( "You are an expert Python programmer. You will be given a question " "(problem specification) and will generate a correct Python program that " "matches the specification and passes all tests. You will NOT return " "anything except for the program." ) messages = [ {"role": "system", "content": system}, {"role": "user", "content": problem_statement}, ] prompt = tokenizer.apply_chat_template( messages, tokenize=False, add_generation_prompt=True, enable_thinking=True, ) inputs = tokenizer(prompt, return_tensors="pt").to(model.device) output = model.generate( **inputs, max_new_tokens=32768, do_sample=True, temperature=0.6, top_p=0.95, top_k=20, ) print(tokenizer.decode(output[0][inputs["input_ids"].shape[1]:], skip_special_tokens=False)) ``` Stop ids used in the official eval: `151643` (`<|endoftext|>`), `151645` (`<|im_end|>`). ## Repo layout - Root: merged HF weights plus `OFFICIAL_MERGE_RECEIPT.json` - `adapter/`: LoRA, `token_rows_both_sides.safetensors`, `TOKEN_ROWS_META.json`, checkpoint `MANIFEST.json` - `provenance/`: train `RUN_IDENTITY.json`, `TRAINING_CONFIG.json`, `POLICY.json`; DEV256 `COMPLETE.json` - `MANIFEST.sha256` Optimizer / resume states are **not** included.