凤
weixin_44093752/tiny-random-llama-ascend-npu
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

hmellor/tiny-random-LlamaForCausalLM Ascend NPU adaptation

This repository adapts the official hmellor/tiny-random-LlamaForCausalLM Transformers checkpoint for an Ascend NPU smoke run. Google/Kimi official-source search and the Hugging Face API were checked on 2026-08-22. The upstream model card leaves the license and repository fields unspecified, so the delivery metadata records unknown rather than guessing a license.

Source lock

  • Official model: hmellor/tiny-random-LlamaForCausalLM
  • Official revision: 9408c553e5c189a7dcdc5a5dbd2feb476b061759
  • Official artifact: model.safetensors
  • Artifact size: 2,128,200 bytes
  • Artifact SHA-256: 542b957bac6c891710a57fbf82a490e6e03e19218311634d340d13f282d66b10
  • Configuration: Llama, hidden size 16, intermediate size 64, 2 hidden layers, 4 attention heads, vocabulary 32,000

Google/Kimi results and the model card describe this checkpoint as a dummy miniature Llama with random weights intended for lightweight CI, regression, loading, and code-parity tests. The adaptation uses the official transformers==4.51.3 loading path, verifies the official Safetensors SHA-256 and exact 21-tensor key set, and does not claim language quality or benchmark accuracy.

Real Ascend smoke result

The same fixed input IDs [0,15043,3186,2] were executed on CPU and a real Ascend910 npu:0 with float32 model weights. This is an execution and finite-logits smoke gate; it does not claim generation quality.

  • CPU forward: 0.004866904113441706 s
  • NPU forward: 0.13741922797635198 s on npu:0
  • Logits shape: [1,4,32000], finite on both devices
  • CPU/NPU logits cosine similarity: 0.9999999999999418
  • Maximum and mean absolute difference: 1.2665987014770508e-07 / 1.715312009409331e-08
  • Greedy next token: 31492 on both CPU and NPU
  • Parameter count: 1,062,992
  • Official checkpoint SHA-256 rechecked on the Pod: 542b957bac6c891710a57fbf82a490e6e03e19218311634d340d13f282d66b10

The result is intentionally reported as smoke_only: true: the current competition pass requires real NPU execution, not language-generation or downstream accuracy evaluation.

Run

Place the official files under model/, source the CANN environment, and run:

root@device:/#

./run.sh

CPU smoke can be selected with DEVICE=cpu ./run.sh. The script writes machine-readable JSON and NumPy logits under validation/.

Evidence

Agent workflow

NPU device call

Model result