Downloads · 30 days
21
15% of all-time downloads
Michionlion/Nanbeige4.2-3B-ONNX-WebGPU
Nanbeige4.2-3B-ONNX-WebGPU is a text generation model from Michionlion. Use it when you need the model to write or continue text. It is set up for transformers.js. The card lists the license as apache-2.0.
Browser-focused ONNX export of Nanbeige/Nanbeige4.2-3B for Transformers.js and ONNX Runtime Web.
Downloads · 30 days
21
15% of all-time downloads
All-time downloads
143
Public
Repo size
3.1 GB
Likes
0
Public
Click a slice to open those files.
.onnx_data1.9 GB · 60%
From the Hugging Face model README
Browser-focused ONNX export of
Nanbeige/Nanbeige4.2-3B
for Transformers.js and ONNX Runtime Web.
The model:
This export currently requires the ONNX Runtime Web development build used by
Shlvl because MatMulNBitsMlp has not reached a stable release.
import { pipeline } from "@huggingface/transformers";
const generator = await pipeline(
"text-generation",
"Michionlion/Nanbeige4.2-3B-ONNX-WebGPU",
{
device: "webgpu",
dtype: "q4f16",
model_file_name: "model_webgpu_mlp",
use_external_data_format: 2,
},
);
The two external-data shards are approximately 1.89 GB and 1.19 GB. Shlvl pins the Hub revision used in production and adds a guarded Apple subgroup reduction for the generated q4 decode shaders; other devices use ONNX Runtime's default kernels.
The tiny fp32 export matched the source PyTorch model for both prefill and cached decode. Full-model paired browser tests retained exact token fingerprints for a 512-token prompt followed by 128 greedy tokens and for a separate chat-like prompt.
This is an experimental browser export. Reduction-order changes in optimized GPU kernels can change close greedy decisions, so evaluate it for your use case before relying on exact reproducibility.