Repository navigation
[2026秋季][1-1] determine123 - #1064
Open
determine123 wants to merge 2 commits into
Open
determine123 wants to merge 2 commits into
determine123 wants to merge 2 commits into
Conversation
This branch has not been deployed
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.
[2026秋季][1-1] determine123
1. 目标模型及推理配置说明
openbmb/MiniCPM-V-2_6(BF16 / FP16,无量化降精度)sm_120,CUDA 12.8.61,GCC 13.3.0)InfiniLM:3a630d1(冻结TRUE_R0扩展r0_shadow/_infinilm.cpython-312-x86_64-linux-gnu.so)InfiniOps:5c597e4src/CMakeLists.txt(新增默认关闭开关INFINIOPS_ENABLE_NT_CONV2D_R14=OFF与可配置 AOT 路径NT_PACK_PATCH_EMBED_R14_DIR/NT_CONV2D_R14_DIR)src/native/cuda/ops/convolution/kernel.h(在#ifdef INFINIOPS_ENABLE_NT_CONV2D_R14保护下接入 NineToothed AOT 卷积快路径,运行时可通过R14_NATIVE_CONV回退)build_pack_patch_embed_r14.py与build_conv2d_r14_verify.py(参考 InfiniOps feat: add NineToothedfused_add_rms_norm#1014 组织方式)2. 复现构建方式(参考 InfiniLM #609)
OFF,无额外 AOT 依赖):ON,实测库496f780d…使用此组开关,并链接此前生成的两个 AOT 库):3. 优化前后端到端性能对比与正确性验证(参考 InfiniLM #638 验证矩阵)
以下全部端到端数据均来自干净上游
5c597e4+ 本 PR 补丁重建的同一候选产物:496f780dbdb7c4cf3337a441c980569ab83bf49e397b356cea6effb7bd513600libnt_pack_patch_embed_r14.so:81b93d35fd6184f35274e064fefe77d72be2d07f190b1eb22c799c3e3ce926fdlibnt_gemm_conv2d_r14_verify.so:c5cdd2a24335607f0047293fc624c06decad9568024c7eb080c6a58f7d82e598TRUE_R0(与候选共用完全相同的r0_shadow扩展;图像用例为 2 轮交替 A/B 均值,长文本needle_4096为 1 轮,单位ms)。3.1 构建、符号与加载验证矩阵
git apply --check(干净上游5c597e4)INFINIOPS_ENABLE_NT_CONV2D_R14=OFF)libinfiniops.soINFINIOPS_ENABLE_NT_CONV2D_R14=ON)496f780d...,operator_call_instantiations_8.cc与generated_dispatch_8.cc入库OperatorFactory<Copy>::Make符号与r0_shadow加载libinfinilm_runtime.so精确匹配,sample_8进程映射确认加载重建库与两套 AOT 库3.2 端到端正确性与性能对比(
TRUE_R0→ 候选496f780d...)vs TRUE_R0)sample_8(out=8)N0(两轮各 8 token 逐项一致)337.73 → 146.972.298×409.06 → 218.381.873×10.175 → 10.190(+0.015 ms)sample_64(out=64)N0(两轮各 60 token 到 EOS 逐项一致)338.62 → 147.562.295×977.24 → 786.731.242×10.135 → 10.140(+0.005 ms)radar_32(out=32)N0(两轮各 32 token 逐项一致)684.97 → 300.282.281×1003.15 → 617.691.624×10.260 → 10.235(-0.025 ms)needle_4096(纯文本,out=8)N0(4 token 到 EOS 一致,答出7429)551.87 → 551.921.000×636.97 → 637.001.000×12.14 → 12.14(0.00 ms)MMLU abstract_algebra(N=100)0 diff(34/100,逐题 JSON 逐字节一致)4. 优化方案与技术实现说明
MiniCPM-V-2_6视觉预填充阶段(SigLIPpatch_embedding,stride = kernel = 14的无重叠 2D 卷积)在原生InfiniOps中走标量ConvKernel慢路径,占视觉预填充主导耗时。build_pack_patch_embed_r14.py):在 NineToothed 中以 6D 张量视图将[B, C_in, H_p*kH, W_p*kW]直接重排为[B, H_p*W_p, C_in*kH*kW];build_conv2d_r14_verify.py):以 NineToothed AOT 矩阵乘 + bias 融合完成patch_embedding,保持 FP32 累加精度以确保严格N0逐 token 一致;patch_embedding形状/数据类型时触发快路径,其余情况自动回退原有实现;CMake 默认OFF不影响上游普通构建。5. 合规与诚信声明
infini::ops::*公共接口,未量化降精度。determine123)完成。HONOR_CODE.md与REFERENCE.md。