Add safetensors BF16 indexing pipeline and reasoning scaffold analysis#66
Merged
Merged
Conversation
…caffold 5 models (27B base/v1/v2 + 9B base/dist), 4 diffs, per-shard diffing with aggregated stats, scaffold detection, NARS revision, and results output. Fixes classify_projection for GGUF-style "embd" tensor names. https://claude.ai/code/session_01M3at4EuHVvQ8S95mSnKgtK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds comprehensive infrastructure for analyzing reasoning distillation across Qwen3.5 models by implementing a safetensors BF16 indexing pipeline and multi-model causal diff analysis framework.
Key Changes
Projection classification fix: Extended
classify_projection()to recognize both "embed" and "embd" naming conventions for embedding layers, improving tensor matching accuracy across different model variants.Safetensors BF16 indexing pipeline: Added complete test infrastructure for streaming and indexing 5 Qwen3.5 models (27B base, 27B v1, 27B v2, 9B base, 9B distilled) from Hugging Face, with HTTP range-based chunked downloads and BF16 compression.
Sharded causal diff analysis: Implemented
causal_diff_sharded()to perform cross-model weight space analysis across multiple safetensors shards, aggregating statistics and causal edges while handling missing or incomplete shard files gracefully.Reasoning scaffold detection: Added multi-stage analysis pipeline including:
Comprehensive test suite: Added 5 per-model indexing tests and 1 full pipeline test (
test_qwen35_claude_reasoning_diff) that:Notable Implementation Details
#[ignore]with data size annotations (55GB for 27B, 18GB for 9B)https://claude.ai/code/session_01M3at4EuHVvQ8S95mSnKgtK