Chapter 39

model/hf — snapshots

github.com/openfluke/welvet/model/hf


Why it exists

Import starts with probing HF/MLX layouts before packing ENTITY.

What it is

InspectSnapshot, DetectArchitecture, safetensors/MLX loaders, Qwen3.5 hybrid helpers.

Go example

examples/39-hf/main.go

Run:cd welvet/examples/39-hf && source ../env.sh && go run .
package main

import (
	"fmt"

	"github.com/openfluke/welvet/model/hf"
)

func main() {
	info, err := hf.InspectSnapshot("/path/to/hf-snapshot")
	if err != nil {
		fmt.Println(err)
		return
	}
	fmt.Println(info)
}

Output

exit 0 · last run via go run .

hf: config.json: stat /path/to/hf-snapshot/config.json: no such file or directory