SmolVLM-500M-Instruct FP32 · Swev
A Core ML export of HuggingFaceTB/SmolVLM-500M-Instruct for Swev: local typed decisions in Swift. Text or a single image in; choices, ordinal scores, and probabilities out. This export does not generate free-form text.
- Package:
smolvlm-500m-instruct-fp32-swev-l4096-k16.mlpackage(download the entire directory). - Precision: FP32 weights and computation; approximately 2.035 GB.
- Text context: up to 4,096 tokens including instructions, answer options, and formatting. Swev chooses the smallest fitting bucket: 128, 256, 512, 1,024, 2,048, or 4,096. Inputs exceeding the limit throw; they are not silently truncated.
- Questions:
choice,score, andnoul; up to 16 answer options per question and 64 questions per request, evaluated independently. - Runtime: Swift 6, macOS 15+ or iOS 18+, Swev schema 2.0, export version 0.3.0. Use current Swev
mainincluding commit4213de1or later for the required tokenizer support. Validated on macOS with CPU-only Core ML; device memory and compute-unit support vary.
Text and single-image requests share one package. Text-only requests skip vision. The image route has a separate 256-token prompt capacity, including 64 image tokens. One PNG/JPEG is resized with nearest-neighbor aspect fit onto a white 512×512 canvas; RGB normalization (mean/std 0.5) is embedded in the graph. Upstream image crop splitting is intentionally disabled. This fixed-canvas profile differs from the source's default preprocessing. Multiple images, video, and audio are not supported.
Swift usage
Add Swev as a Swift package dependency, then:
import Swev
let model = try await SwevModel.load(from: HuggingFaceModel(
repository: "danielamitay/smolvlm-500m-instruct-fp32-swev",
package: "smolvlm-500m-instruct-fp32-swev-l4096-k16.mlpackage"
))
let response = try await model.predict(
state: "apple",
questions: [.noul(id: "edible", instructions: "Is this an edible food?")]
)
print(try response.noul("edible").noul)
The first load downloads the package; subsequent loads reuse Swev's local download cache. Keep the model resident to avoid repeated initialization. Tokenizer and inference settings are bundled; no Python runtime or separate adapter files are required. See loading and caching and model support.
Source and conversion
Source: HuggingFaceTB/SmolVLM-500M-Instruct at a7da5b986cb5. This is a converted export, not a new fine-tune. It retains text and vision paths, restricts output to candidate-label logits, and uses source role framing with an Assistant: Answer: prefill. Image inputs use the fixed-canvas deployment profile described above.
See Swev's conversion guide and schema reference for the package contract. Declared capacity is not a guarantee of decision accuracy; evaluate text and image behavior on your own inputs, especially OCR, documents, counting, and spatial reasoning.
License
The source model card declares Apache License 2.0; see LICENSE. Source attribution and pinned revision are provided above. This is an independent Swev-compatible export, not an official release by the original model authors.
- Downloads last month
- 4
Model tree for danielamitay/smolvlm-500m-instruct-fp32-swev
Base model
HuggingFaceTB/SmolLM2-360M