Summary
The apr tensors command truncates output to 100 tensors even when the APR v2 file contains 291 tensors. The file is correctly formatted and passes all validation.
Steps to Reproduce
- Import a GGUF model with 291 tensors using
apr import --preserve-q4k
- Run
apr tensors <output.apr>
- Observe only 100 tensors displayed
Expected Behavior
All 291 tensors should be listed.
Actual Behavior
Only 100 tensors displayed (layers 0, 1, 10-16 visible; layers 2-9, 17-23 missing from display).
Evidence
APR Header (correct)
Tensor count: 291
Checksum: Valid (0xbf4b5d26)
Python Verification (all 291 present)
# Tensor index parsing shows all 291 tensors
Tensor 0: blk.0.attn_k.bias
...
Tensor 290: token_embd.weight
Total tensors read from index: 291
apr tensors output (truncated)
Analysis
The file contains all 291 tensors with correct sorting. The issue appears to be in the APR v2 reader's tensor index parsing or the tensor listing logic in aprender::format::tensors::list_tensors_v2.
Possible locations:
src/format/v2/mod.rs - TensorIndexEntry::from_bytes parsing
src/format/tensors.rs - list_tensors_v2 function
Related
- realizar#44 (APR import truncation - converter fixes complete)
- This bug blocks verification of the realizar fixes
Environment
- aprender version: latest main
- Input: GGUF file with 291 tensors (qwen2 architecture, 24 layers)
Summary
The
apr tensorscommand truncates output to 100 tensors even when the APR v2 file contains 291 tensors. The file is correctly formatted and passes all validation.Steps to Reproduce
apr import --preserve-q4kapr tensors <output.apr>Expected Behavior
All 291 tensors should be listed.
Actual Behavior
Only 100 tensors displayed (layers 0, 1, 10-16 visible; layers 2-9, 17-23 missing from display).
Evidence
APR Header (correct)
Python Verification (all 291 present)
apr tensors output (truncated)
Analysis
The file contains all 291 tensors with correct sorting. The issue appears to be in the APR v2 reader's tensor index parsing or the tensor listing logic in
aprender::format::tensors::list_tensors_v2.Possible locations:
src/format/v2/mod.rs-TensorIndexEntry::from_bytesparsingsrc/format/tensors.rs-list_tensors_v2functionRelated
Environment