autogluon/mitra-classifier 是基于 12 层 Transformer (dim 512, 4 heads, 75.67M 参数) 的表格基础模型,通过纯合成数据与混合随机分类器预训练,支持上下文学习 (in-context learning) 范式的零样本分类。模型卡见 autogluon/mitra-classifier。
c425e9fa0910a6be1c494321792e7ba2a1367b1amodel.safetensors 288.7 MB, 参数量 75,670,026, FP32, Tab2Dconfig.json dim 512 dim_output 10 n_layers 12 n_heads 4 task CLASSIFICATIONtorch, torch_npu, einops, einx, safetensors, scikit-learn, 无 trust_remote_code任务路由: 普通表格分类 — 输入
x_support [B, n_s=142, f=13]+y_support [B, n_s]+x_query [B, n_q=36, f=13]→ 输出logits [B, n_q, 10](取前 3 列对应 Wine 的 3 类),经 softmax 得probs与preds。
x_support [1, 142, 13] float32, 训练集 142 行 13 特征, 均值 68.55, 无缺失y_support [1, 142] int64, 类别 0/1/2 (47/57/38)x_query [1, 36, 13] float32, 测试集 36 行padding masks 均为 False, 轴顺序 [B, S, F], 列顺序固定 13 列train_test_split(test_size=0.2, random_state=42, stratify=y) 确定性logits [36, 10] finite, 样本 [0,:5]=[10.309,4.542,2.193,3.034,-0.454]probs [36, 3] 样本 [0]=[0.9965,0.0031,0.00029]preds accuracy 1.0 (36/36)Tab2DQuantileEmbeddingX 分位数归一化, 无外部 StandardScalertorch.npu.is_available()==True, device_count=2, torch.npu.get_device_name(0)=Ascend910_9362pip install -r requirements.txtpython inference.py日志示例见 assets/model_result.png。
logits [36,10] finite, accuracy 1.0, 首轮 0.452s, 次轮 0.028spython /opt/atomgit/.opencode/skills/npu-adapt-skills/scripts/compare_outputs.py --cpu working/cpu_logits.npy --npu working/npu_logits.npy --task classification --atol 1e-2 --rtol 1e-2max_abs_error 0.00581 mean 0.00129 argmax 1.0 passed true (atol 1e-2 rtol 1e-2)avg 0.0275s min 0.0270s max 0.0285s p50 0.0273s p90 0.0279s p95 0.0282s throughput 1310.6 rows/s compile 0.452sassets/agent_workflow.png — 工作流assets/npu_device_call.png — NPU 设备assets/model_result.png — 推理结果三图由 xterm.js 根据真实日志渲染。