Skip to main content

Crate modelc

Crate modelc 

Source

Modules§

arch
Shared model-structure inspection for transformer architectures.
chat_template
Simple chat message formatting for transformer models.
cli
Command-line parsing and helpers shared with the compiler.
codegen
compiler
config
Configuration file support for modelc.
constraint
Grammar-based constrained decoding.
containerize
Generate a minimal Docker/OCI image for a .modelc artifact.
draft
Neural draft model for speculative decoding (EAGLE-style).
generate
Autoregressive text generation for GPT-2 / LLaMA transformer models.
json_schema
Lightweight JSON validation for generated output.
kv_error
Error types and handling for KV cache operations.
lora
LoRA (Low-Rank Adaptation) adapter support.
metal
Apple Silicon Metal acceleration backend (macOS only).
model
onnx_exec
ONNX graph execution engine.
pack
Single-file artifact format for modelc.
parsers
prefix_cache
Prompt-prefix KV cache for autoregressive generation.
runtime
Tensor runtime and inference ops used by tests and examples (matmul, linear, etc.).
serve
HTTP server for modelc run — loads a .modelc artifact and serves /info + /infer + /chat + /complete.
store
Local model package store for modelc list / modelc pull.
tempdir
Minimal RAII temporary-directory helper.
tokenizer
Byte-level BPE tokenizer for GPT-2 style models.

Constants§

CLI_VERSION
Semver plus short git SHA from build.rs, shown by modelc --version.
GIT_SHA
Short git SHA from build.rs.