Files
hao-ai-lab-FastVideo/tests
SolitaryThinker 8d1c8fa01a [feat] cosmos3 PR4: text reasoning (und pathway + lm_head), bit-exact
Add the reasoning (VLM text-generation) capability. The framework reasoner uses
only the und (causal) pathway weights (no _moe_gen) + embed_tokens / norm /
lm_head — all already present in the native DiT — so a text-only forward + lm_head
reproduces it with no new model code.

- `cosmos3_generate_reasoner_text(transformer, input_ids, max_new_tokens)`:
  greedy text reasoning via the und causal backbone + lm_head (text-only prefill,
  re-prefill per step; KV-cache fast path is a later optimization). Mirrors the
  framework `generate_reasoner_text` (text-only path).
- Parity (`test_cosmos3_reasoning_parity.py`, framework = oracle):
  * prefill logits (native text-only forward + lm_head vs framework
    `reasoner_forward` + lm_head, per-position): max abs diff = 0.0, mean = 0.0;
  * greedy generation vs framework `generate_reasoner_text(do_sample=False)`:
    token-for-token identical across seeds.

Text reasoning is fully supported + bit-exact. Image-conditioned reasoning
additionally needs the Qwen3-VL `vision_encoder` (a transformers ViT, tracked
separately). Full suite: 146 passed, 0 skipped.
2026-07-20 12:19:46 -07:00
..

Tests

  • tests/local_tests/ holds local-only parity, smoke, and component tests organized by model family (e.g. tests/local_tests/ltx2/, tests/local_tests/stable_audio/). They typically require a checked-out reference repo and/or model weights and are skipped in CI; see each family's README.md for setup. The top-level tests/local_tests/README.md is the family index.
  • The CI-backed test suite still lives in fastvideo/tests/.
  • Eventually, all tests will move under tests/.