mirror of
https://github.com/deepseek-ai/DeepInfer.git
synced 2026-10-31 00:36:20 +08:00
- examples/neuron: tiny random V4.1 checkpoint in the real HF layout, pure-torch replacements for the official reference kernels, golden generation, a teacher-forced DeepInfer runner (LLM offline API) and a comparison tool. CPU mode: 25/27 greedy tokens match, worst logits cos 0.9985 / rel 0.056 against a reference self-noise floor of 0.032-0.060. - model_loader: check parameters against the platform device, not is_cuda. - deep_gemm paged MQA logits: do not dereference block-table slots past the context. - bind_cpu: skip in Neuron CPU mode (1 core per NeuronCore share would serialize host compute). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
73 lines
1.3 KiB
JSON
73 lines
1.3 KiB
JSON
{
|
|
"what": "reference vs itself: torch CPU threads 16 (golden) vs 7 and 32, teacher-forced on the golden tokens; use as the tolerance floor when comparing DeepInfer against the golden (compare_golden.py)",
|
|
"prompts": {
|
|
"short": {
|
|
"max_logits_rel": 0.031786,
|
|
"min_logits_cos": 0.999495,
|
|
"max_kl": 0.000499,
|
|
"min_top5_overlap": 4,
|
|
"argmax_mismatches": [],
|
|
"max_hidden_rel_per_layer": [
|
|
6e-05,
|
|
0.00047,
|
|
0.004855,
|
|
0.009456,
|
|
0.012744,
|
|
0.018298,
|
|
0.02,
|
|
0.021909,
|
|
0.030419,
|
|
0.031869
|
|
]
|
|
},
|
|
"medium": {
|
|
"max_logits_rel": 0.038841,
|
|
"min_logits_cos": 0.999248,
|
|
"max_kl": 0.000751,
|
|
"min_top5_overlap": 4,
|
|
"argmax_mismatches": [
|
|
{
|
|
"threads": 7,
|
|
"step": 6,
|
|
"golden_margin": 0.00963
|
|
},
|
|
{
|
|
"threads": 32,
|
|
"step": 6,
|
|
"golden_margin": 0.00963
|
|
}
|
|
],
|
|
"max_hidden_rel_per_layer": [
|
|
3e-05,
|
|
0.000146,
|
|
0.00754,
|
|
0.010748,
|
|
0.015295,
|
|
0.020652,
|
|
0.030513,
|
|
0.032413,
|
|
0.036607,
|
|
0.0383
|
|
]
|
|
},
|
|
"long": {
|
|
"max_logits_rel": 0.059876,
|
|
"min_logits_cos": 0.998208,
|
|
"max_kl": 0.001755,
|
|
"min_top5_overlap": 4,
|
|
"argmax_mismatches": [],
|
|
"max_hidden_rel_per_layer": [
|
|
0.000172,
|
|
0.000188,
|
|
0.000175,
|
|
0.00383,
|
|
0.022313,
|
|
0.046369,
|
|
0.050459,
|
|
0.054834,
|
|
0.05773,
|
|
0.059775
|
|
]
|
|
}
|
|
}
|
|
} |