SAM 3 β€” GGUF

Unofficial GGUF conversion of Meta's facebook/sam3 (HF Sam3VideoModel). This repository packages the original weights into GGUF containers for use with custom C++ inference stacks built on top of ggml / llama.cpp's gguf reader.

The original model is redistributed here unchanged in numerical content β€” only the on-disk container format differs. The SAM License terms of the upstream release apply in full (see LICENSE).

Files

File Precision Size
sam3-f32.gguf FP32 (all tensors) ~3.21 GB
sam3-f16.gguf FP16 (weights) + FP32 (norms / embeddings / heads / biases) ~1.70 GB
sam3-q8_0.gguf Q8_0 (2-D Linear weights) + FP32 (rest) ~1.06 GB

Pick one file β€” each is self-contained (config, tokenizer, and all tensors in a single .gguf).

What is preserved

The converter follows llama.cpp's GGUF conventions and keeps the mapping from the upstream HF release intact:

  • Tensor names are kept verbatim from model.safetensors. No renaming, no merging, no reshaping. Any custom reader can look tensors up by their original HF names (e.g. image_encoder.trunk.blocks.0.attn.qkv.weight).
  • Config KV β€” every key in the upstream config.json is flattened into the GGUF metadata under the sam3.* namespace (typed scalars / arrays where possible). The full raw config is additionally embedded as a single string KV sam3.config_json so nested structures survive round-tripping.
  • Tokenizer β€” the CLIP byte-level BPE tokenizer (vocab.json + merges.txt
    • special tokens from tokenizer_config.json) is written under the standard tokenizer.ggml.* keys, with tokenizer.ggml.model = "clip".
  • Architecture tag β€” general.architecture = "sam3".

Precision policy

Small / quantization-sensitive tensors are always kept at FP32 regardless of the output type. These include:

  • All 1-D tensors (biases, norms, scales)
  • Positional / temporal embeddings, RoPE frequencies, learned query/prompt tokens (mask_tokens, iou_token, obj_score_token, presence_token, …)
  • Final projections of task/output heads (box / presence regression .layer3, and .proj_out of iou_prediction_head / pred_obj_score_head / output_hypernetworks_mlps)
  • LayerNorm / RMSNorm parameters, logit_scale, gamma tensors

For f16: everything not in the keep-FP32 list is down-cast to FP16. For q8_0: 2-D Linear weight matrices whose last dim is a multiple of 32 are quantized to GGML Q8_0 (block size 32, symmetric int8); Conv (4-D), norms, embeddings, and biases stay FP32. There is no FP16 path in the Q8_0 file β€” the non-quantized tensors are plain FP32.

Note

These files cannot be run with stock llama.cpp or llama-cli. SAM 3 is not an LLM β€” it has no LLM/segmentation graph in llama.cpp. The .gguf files here are containers intended to be consumed by a custom C++ reader (e.g. via gguf_init_from_file in ggml) paired with a SAM 3 inference implementation that mirrors the reference PyTorch model.

License

Distributed under the SAM License, inherited from the upstream facebook/sam3 release. By downloading or using these files you agree to the same terms as the original SAM 3 distribution.

Downloads last month
84
GGUF
Model size
0.9B params
Architecture
sam3
Hardware compatibility
Log In to add your hardware

8-bit

16-bit

32-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for erectbranch/sam3-gguf

Base model

facebook/sam3
Quantized
(15)
this model