EMLXAxon.Qwen3.DenseLoader (emlx_axon v0.4.0)

Copy Markdown View Source

Builds native Qwen3 %EMLXAxon.Qwen3.Model.State{} structs from standard Bumblebee Qwen3 dense parameters or Hugging Face safetensors files.

Bumblebee stores dense linear kernels in {in, out} convention. The native dense Qwen3 bridge keeps that layout so MLX can use direct matmul(input, weight) calls without adding a transpose node for every projection in the decode graph.

Summary

Functions

Converts a Bumblebee Qwen3 model_info map into a native dense state.

Loads a native dense Qwen3 state directly from a local safetensors directory.

Loads a native dense Qwen3 state from explicit config and safetensors files.

Functions

from_model_info(arg1)

Converts a Bumblebee Qwen3 model_info map into a native dense state.

from_safetensors_dir(path, opts \\ [])

Loads a native dense Qwen3 state directly from a local safetensors directory.

This fast path is intended for standard dense Qwen3 checkpoints using Hugging Face tensor names, such as local f16/bf16 conversions. Projection weights are transposed once at load time from safetensors {out, in} layout into the native dense {in, out} layout.

from_safetensors_files(config_path, safetensors_paths, opts \\ [])

Loads a native dense Qwen3 state from explicit config and safetensors files.

This is useful when a repository cache stores files by content addressed names rather than as a model directory.