eardoi/ayutthayaalpha-npu
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

AyutthayaAlpha 2.0 Early Beta(昇腾 NPU 适配)

davor/ayutthayaalpha-2.0-early-beta 是基于 T5 架构的泰语模型(73.5M 参数), 支持泰语文本生成与翻译(如英→泰)。

本项目完成其在**华为昇腾 NPU(Ascend 910B)**上的推理适配与验证。

模型规格

项目说明
模型架构T5ForConditionalGeneration(t5)
参数量73.5M
权重格式safetensors(model.safetensors,284MB)
支持任务泰语翻译、文本生成

推理

cd /workspace/ayutthayaalpha
python3 inference.py --model_path ./model_src \
    --prompt "translate English to Thai: Hello, how are you today?" --device npu:0

验证结果(Ascend 910B, npu:0)

输入 "translate English to Thai: Hello, how are you today?" → 生成泰语翻译,NPU 推理链路完整跑通。

适配说明

  • 标准 T5 架构,直接 .to(npu) 迁移 + model.generate()。
  • 设备解析 resolve_device():NPU 可用性检测,失败自动回退 CPU。
  • 模型权重不推送到仓库:*.safetensors 已加入 .gitignore。

引用

  • 模型:https://huggingface.co/davor/ayutthayaalpha-2.0-early-beta