Documentation

ModelFoundry documentation

Everything needed to install the client, authenticate a workspace, pull a verified checkpoint and serve it locally. The docs mirror the 1.8.0 CLI and 1.8.0 runtime.

Reading is open, downloading is not. Model cards, manifests and evaluations are public. Weight files live in private storage and require a workspace key.

Installation #

The installer detects your platform and drops a single static binary into ~/.foundry/bin. It does not touch a Python environment, a CUDA toolkit or a container runtime.

Every example below uses MF_HOST — the base URL of the hub you are talking to, scheme included. Set it to the host that served this page; nothing else in the client or the SDK is tied to a particular domain.

install.sh
# point the tools at this host
export MF_HOST="https://your-mirror-host"

# macOS / Linux
curl -fsSL "$MF_HOST"/install.sh | sh

# Windows (PowerShell)
$env:MF_HOST = "https://your-mirror-host"
irm "$env:MF_HOST"/install.ps1 | iex

# or download a release asset directly
foundry --version
PlatformBinaryMinimum
Linux x86-64foundry-1.8.0-linux-amd64glibc 2.31
Linux arm64foundry-1.8.0-linux-arm64glibc 2.31
macOS universalfoundry-1.8.0-macos-universalmacOS 12
Windows x86-64foundry-1.8.0-windows-amd64.exeWindows 10

Quickstart #

Four commands: install, authenticate, pull, serve.

terminal
foundry login --key "$MF_KEY"
foundry pull mf-ember-7b-instruct --quant q4_k_m
foundry serve ./mf-ember-7b-instruct-q4_k_m.gguf --ctx 32768 --parallel 4
foundry chat --alias mf-ember-7b-instruct

The client verifies the manifest digest on every pull, prints the digest it received and refuses to write a file that does not match. Point it at a mirror with --registry if you operate a private copy of the catalog.

Authentication #

Workspace keys look like MF-XXXX-XXXX-XXXX-XXXX and are the only credential in the system. There is no OAuth flow, no session cookie and no password reset — a key is created, scoped, rotated and revoked by the node administrator.

terminal
# interactive
foundry login

# non-interactive, from a secret store
foundry login --key "$MF_KEY"

# inspect the key that is currently active
foundry whoami
Unsigned requests get a flat 401. Anonymous pulls return 401 unauthorized with a WWW-Authenticate: Bearer challenge, whether or not the requested model exists.

Keys carry a scope: pull for weights, eval for the harness and hosted for third-party inference on our fleet. A key with the wrong scope fails with 403 and a message naming the scope it needs.

CLI reference #

CommandDescription
foundry loginStore a workspace key in ~/.foundry/credentials
foundry whoamiShow the active key, its scopes and its workspace
foundry searchQuery the catalog index from the terminal
foundry pullDownload a verified build, resumable and digest-checked
foundry serveRun the local inference server on a model file
foundry chatInteractive REPL against a served alias
foundry evalRun the published harness against one or two builds
foundry verifyRe-run the publication gate on a local file
foundry benchMeasure TTFT, inter-token latency and throughput
foundry convertQuantize or re-pack a checkpoint for publication

Common flags

foundry pull --help
--quant Q4_K_M|Q5_K_M|Q8_0|F16|BF16   quantization to fetch
--include tokenizer,config,license      auxiliary files to fetch
--resume                            continue an interrupted transfer
--out ./dir                           destination directory
--registry https://host               alternate catalog mirror
--insecure-skip-verify-tls          only for local test registries
--dry-run                           resolve and verify without downloading

REST API #

The public surface is intentionally small. Everything that mutates state requires a bearer key; everything that reads is cacheable at the edge.

MethodPathAuthNotes
GET/v1/modelsnonePaginated catalog index, filter by task and license
GET/v1/models/{id}noneManifest, digests, license, eval summary
GET/v1/models/{id}/evalsnoneReference results for every published build
POST/v1/pullsbearerCreates a short-lived signed transfer
GET/v1/pulls/{id}bearerTransfer state, bytes served, expiry
POST/v1/keys/rotatebearerIssues a replacement key for the same scopes
POST/v1/eval/runsbearer evalStarts a harness run against a pulled build
request
curl -sS "$MF_HOST"/v1/models/mf-ember-7b-instruct \
  | jq '{id, license, builds: [.builds[] | {quant, sha256, bytes}]}'

# anonymous pull attempt — flat 401, no model enumeration
curl -sS -o /dev/null -w '%{http_code}\n' \
  -X POST "$MF_HOST"/v1/pulls \
  -d '{"model":"mf-ember-7b-instruct","quant":"Q4_K_M"}'

Python SDK #

The client is a thin wrapper over the same endpoints and works with any OpenAI-compatible server.

example.py
import os
from modelfoundry import Client

# MF_HOST is the base URL of the hub, scheme included
client = Client(base_url=os.environ["MF_HOST"])
client.login(api_key="MF-KEY-REDACTED")

# catalog reads need no key at all
for m in client.models.list(task="code"):
    print(m.id, m.license, m.context)

# streaming chat against your own local server
for chunk in client.chat.create(
        model="mf-cobalt-13b-code",
        messages=[{"role": "user", "content": "add a regression test"}],
        stream=True, temperature=0.2):
    print(chunk.delta, end="")

Manifest format #

A manifest is signed, versioned and the single source of truth for a checkpoint.

mf-ember-7b-instruct.manifest.json
{
  "id": "mf-ember-7b-instruct",
  "revision": "1.8.0",
  "license": "MF-RL-1.0",
  "tokenizer_sha256": "1b9f…7ac0",
  "eval_suite": "mf-eval/3.2",
  "builds": [
    { "quant": "Q4_K_M", "bytes": 4724461824, "sha256": "9f4c…ae21" },
    { "quant": "Q5_K_M", "bytes": 5476072448, "sha256": "2ab8…04cf" },
    { "quant": "Q8_0",  "bytes": 8160432128, "sha256": "77de…31b9" }
  ],
  "signature": "ed25519:…"
}

Serving & performance #

Three knobs decide almost everything: context length, concurrency and the scheduler.

serve
foundry serve ./mf-atlas-32b-instruct-q4_k_m.gguf \
  --ctx 32768 \
  --parallel 8 \
  --sched continuous \
  --prefix-cache \
  --draft ./mf-sable-1.5b-instruct-q4_k_m.gguf \
  --draft-tokens 5 \
  --port 8080
  • Continuous batching is the default and should stay on for any mixed workload.
  • Prefix cache pays for itself in chat and agent loops; turn it off for single-shot completions.
  • Speculative decoding helps interactive traffic and hurts pure batch throughput.
  • Admission control is a feature: interactive sessions should get a fast rejection instead of an unbounded queue.

Evaluation harness #

Every release pins a suite version, a judge model and decoding parameters. The harness is part of the public surface: if a number in a model card cannot be reproduced, it is a bug in the card, not in your setup.

eval.toml
[suite]
version = "mf-eval/3.2"
tasks = ["mmlu-pro", "ifeval", "humaneval+", "longbench", "mt-bench"]

[decode]
temperature = 0.0
seed = 1337
max_tokens = 2048

[judge]
model = "mf-granite-judge-8b"
temperature = 0.0

Mirroring this site #

The catalog itself is a set of static files. Anyone can mirror it: copy the tree, point a web server at it, and optionally redirect the CLI at your copy with --registry. Weight transfers stay on the origin unless your key is provisioned for your storage.

mirror.sh
rsync -a --delete ./site/ mirror.example:/srv/modelfoundry/
foundry search --registry https://mirror.example
foundry pull mf-ember-7b-instruct \
  --registry https://mirror.example \
  --registry-weights https://weights.example
Keep robots.txt, the manifest links and the license files byte-identical when mirroring. License terms travel with the files, not with the host.

Troubleshooting #

SymptomCauseFix
401 unauthorized on pullNo key, or the key is not stored for this registryfoundry whoami, then foundry login --key …
403 naming a scopeKey lacks pull or evalAsk the administrator to widen the key scope
Digest mismatch after transferTruncated download or a mirror serving a stale objectfoundry pull --resume, then compare the printed digest with the manifest
Coherent text, wrong formatTokenizer mismatch on a converted buildRe-run foundry verify against the family manifest
First token takes secondsPrefix cache disabled or the file was not memory-mappedEnable --prefix-cache, keep weights on local NVMe
Throughput collapses under burstStatic batching or an unbounded queueSwitch to the continuous scheduler and enable admission control

Contributing #

Conversion tools, evaluation tasks, runtime fixes and documentation are all welcome. Publishing new weights is a smaller door: a pull request must include a model card, a license choice, reference results from the pinned suite and someone willing to maintain it.

  • Bug fixes and docs land directly after review by one maintainer.
  • New evaluation tasks must be reproducible and must not leak answers into the prompt set.
  • New weights need a signed manifest and a passing foundry verify --strict run.
  • Derivative models must be renamed and carry their own license; the mf- prefix is reserved.

Licenses #

LicenseUsed bySummary
MITSmall chat, edge and rerank buildsFree use, modification and redistribution with attribution
Apache-2.0General chat, multilingual, vision, embeddingsAs MIT, plus an explicit patent grant and NOTICE handling
MF-CODE-1.0Code familyAs Apache-2.0, with a naming restriction on derivatives
MF-RL-1.0Reasoning and MoE familiesResearch and internal use free; hosted third-party access requires a key; derivatives must be renamed

Quantizing or fine-tuning produces a derivative work under every license above. Say so in your distribution, keep the license file attached, and do not present a derivative as an official build.

Terms of use #

The catalog, documentation and evaluation harness are provided as-is for research and internal use. Weight downloads are subject to the license attached to each checkpoint and to a workspace key. We do not offer warranties on benchmark parity across quantizations, and we may withdraw a build whose provenance cannot be established.

Privacy #

The mirror is static and sets no cookies. Server logs keep request metadata for abuse control — address, path, user agent, status — and nothing else. Pull transfers are recorded against a key identifier so an administrator can answer "was this build downloaded by us?" without storing request bodies or credentials.

FAQ #

Why is there no public download button?

Because a public bucket cannot be revoked. Keys are cheap to rotate; a re-upload of a 68 GB checkpoint is not.

Can I use the models commercially?

MIT and Apache-2.0 builds, yes. MF-RL-1.0 builds require a key for hosted third-party access, and the terms are in the license file.

Do you train the models?

We train most of the chat, code and embedding families. Mixture-of-experts releases include work from partner labs, credited on the model page.

Why does my score differ from the model card?

Usually quantization. Run the published harness against both builds and compare; the difference should be small, and if it is not, that is a reportable finding.

Can I mirror the catalog?

Yes — it is static HTML. See mirroring this site. Keep the license files and manifest links intact.


Documentation revision docs-1.8.0 · built alongside CLI 1.8.0 · Changelog · Status · Security