本仓库为 HuggingFace 模型 Shadow0482/mythos_fast 提供昇腾 Ascend910 NPU (torch-npu) 推理适配。
VibeThinker-3B.Q8_0.gguf),由 Unsloth 量化gguf 包反量化 GGUF 张量重建 HF 状态字典;Qwen2 为 NeoX 风格 rope,
GGUF 中的 q/k 权重已按 HF 布局存储(无需 llama.cpp 的 head 重排还原);
模型与输入全部迁移到 npu:0。pip install -r requirements.txtpython inference.py --img test_prompt.txt --max_new_tokens 160 --output_json result_cli.jsonpython inference.py --serve --port 8001
curl -F "file=@api_test_input.txt" http://127.0.0.1:8001/predictCLI (What is the capital of France?):
The capital of France is Paris.
FastAPI (What is 2+2?):
4
inference.py — 双模式推理入口(CLI + FastAPI),NPU 初始化 try-exceptgguf_convert.py — GGUF(Q8_0) → HF state_dict 转换requirements.txt — 依赖清单assets/ — 适配验证证据截图(NPU 环境、CLI 推理、FastAPI 返回)