xybrid-ai/xybrid

Cross-platform on-device AI toolkit

448

stars

778

commits

Rust

primary language

Sep 11, 2026

updated

xybrid.ai
ai-games
edge-ai
ios
kotlin
llamacpp
llm
mobile-llm
ollama
on-device-ai
on-device-ml
onnx-runtime
privacy
privacy-tools
rust
swift
unity3d
unity-ai
voice-ai
voice-assistant

README

English · 简体中文 · 日本語

Xybrid Logo

Xybrid

Run LLMs, ASR, and TTS natively in apps and games.
Flutter · Swift · Kotlin · Unity · Rust
Private, offline, no cloud required.

Docs Website Follow on X Discord

Build License OpenSSF Scorecard OpenSSF Best Practices
Release crates.io pub.dev Maven Central Swift Package Manager
Ask DeepWiki Stars Visitors

Desktop demo     Android demo

Quick Start

Install and run a model in your language of choice.

Flutter SDK Swift SDK Kotlin SDK Unity SDK
Rust crate Python SDK Web SDK preview CLI

Each badge links to its platform setup. See the full Installation Guide for all options.

Flutter

Install in pubspec.yaml:

dependencies:
  xybrid_flutter: ^0.6.0

Run a model:

final model = await Xybrid.model('kokoro-82m').load();
final result = await model.run(XybridEnvelope.text('Hello world'));
// result → 24kHz WAV audio

Kotlin

Install in build.gradle.kts:

dependencies {
    implementation("ai.xybrid:xybrid-kotlin:0.6.0")
}

Run a model:

val model = Xybrid.model("kokoro-82m").load()
val result = model.runAsync(Envelope.text("Hello world"))
// result → 24kHz WAV audio

Swift

Install in Package.swift:

dependencies: [
    .package(url: "https://github.com/xybrid-ai/xybrid.git", from: "0.6.0")
]

Run a model:

let model = try await Xybrid.model("kokoro-82m").load()
let result = try await model.runAsync(envelope: Envelope.text("Hello world"))
// result → 24kHz WAV audio

Unity

Game demo

Install via OpenUPM (recommended):

openupm add ai.xybrid.sdk

Or add https://package.openupm.com as a scoped registry for scope ai.xybrid.

Install manually — add the git subfolder as a UPM package:

https://github.com/xybrid-ai/xybrid.git?path=/bindings/unity

Native libraries download automatically on import. See the Unity SDK guide for details.

Run a model:

var model = XybridClient.LoadModel("kokoro-82m");
var result = model.Run(Envelope.Text("Hello world"));
// result → 24kHz WAV audio

Rust

Install in Cargo.toml:

[dependencies]
xybrid = "0.6.0"

Run a model:

let model = Xybrid::model("kokoro-82m").load()?;
let result = model.run(&Envelope::text("Hello world"))?;
// result → 24kHz WAV audio

CLI

Install:

# macOS / Linux
curl -sSL https://raw.githubusercontent.com/xybrid-ai/xybrid/master/install.sh | sh
# Windows (PowerShell)
irm https://raw.githubusercontent.com/xybrid-ai/xybrid/master/install.ps1 | iex

Run a model:

xybrid run --model kokoro-82m --input-text "Hello world" -o output.wav

Multi-Model Inference Pipelines — MMP (Experimental)

Chain models together into a single multi-model inference pipeline (MMP) — build a voice assistant in 3 lines of YAML:

# voice-assistant.yaml
name: voice-assistant
stages:
  - model: whisper-tiny-ggml  # Speech → text
  - model: qwen2.5-0.5b       # Process with LLM
  - model: kokoro-82m         # Text → speech

CLI:

xybrid run --config voice-assistant.yaml --input-audio question.wav -o response.wav

Flutter:

final pipeline = Xybrid.pipeline(yaml: yamlString);
final result = await pipeline.run(XybridEnvelope.audio(bytes: audioBytes, sampleRate: 16000));

Kotlin:

// Multi-model pipeline (MMP) support coming soon — use single model loading for now

Swift:

// Multi-model pipeline (MMP) support coming soon — use single model loading for now

Unity (C#):

// Multi-model pipeline (MMP) support coming soon — use single model loading for now

Rust:

let pipeline = Xybrid::pipeline(&yaml_string).load()?;
pipeline.load_models()?;
let result = pipeline.run(&Envelope::audio(audio_bytes))?;

Supported Models

All models run entirely on-device. No cloud, no API keys required. Browse the full catalogue at xybrid.ai/models, or run xybrid models list.

Speech-to-Text

ModelParamsDescription
Whisper Tiny39MMultilingual transcription on whisper.cpp — in every platform preset
Wav2Vec2 Base95MEnglish ASR with CTC decoding

Text-to-Speech

ModelParamsDescription
Kokoro 82M82MHigh-quality, 24 natural voices
KittenTTS Nano15MUltra-lightweight, 8 voices
NeuTTS Nano120MCodec TTS with voice cloning

LLM

ModelParamsDescription
LFM2.5 230M230MLiquid AI's smallest hybrid conv+attention LLM — 9 languages, tool calling
LFM2.5 350M354MSame architecture, more headroom — 9 languages, tool calling
LFM2.5 1.2B Instruct1.2BAgentic tasks and data extraction
LFM2.5 1.2B Thinking1.2BReasoning model — chain-of-thought via reasoningContent (guide)
SmolLM2 360M360MBest tiny LLM, excellent quality/size ratio
FunctionGemma 270M270MPurpose-built for function calling
Gemma 3 1B1BGoogle's mobile-optimized LLM, 32K context
Gemma 4 E2B5.1BGoogle's compact multimodal LLM, 2.3B effective params
Gemma 4 E4B8BGoogle's mid-range multimodal LLM, 4.5B effective params
Llama 3.2 1B1BMeta's general purpose, 128K context
Qwen 3.5 0.8B800MReasoning (thinking mode), 201 languages
Qwen 3.5 2B2BLarger Qwen 3.5 with extended reasoning
Bonsai 27B27BPrismML's 1-bit multimodal LLM (text + vision), hybrid attention

Vision-Language

ModelParamsDescription
LFM2-VL 450M450MLiquid AI's compact VLM (SigLIP2 vision)
LFM2.5-VL 3B3BLarger Liquid VLM for local inference

Tool calling: see the Tool Calling guide.

Bring Your Own Model (Experimental)

Note: BYM support is experimental. The model_metadata.json schema is stable, but the AI-assisted tooling (/xybrid-init) is under active development and may not handle all model types yet.

Xybrid works with any ONNX, GGUF, or SafeTensors model. You just need a model_metadata.json that tells xybrid how to run it.

With an AI assistant (Claude Code, Codex, etc.):

# Install xybrid skills into your project
curl -sSL https://raw.githubusercontent.com/xybrid-ai/xybrid/master/tools/scripts/install-skills.sh | sh

# Generate model_metadata.json from a HuggingFace model
claude /xybrid-init hexgrad/Kokoro-82M-v1.0-ONNX

Skills are agent-agnostic and live in agents/skills/. The installer symlinks them for Claude Code (.claude/skills) and Codex (.codex/skills).

Manually — create model_metadata.json in your model directory:

{
  "model_id": "my-model",
  "version": "1.0",
  "execution_template": { "type": "Onnx", "model_file": "model.onnx" },
  "preprocessing": [],
  "postprocessing": [],
  "files": ["model.onnx"],
  "metadata": { "task": "text-generation" }
}

See the model metadata docs for the full schema, or look at existing examples in integration-tests/fixtures/models/.


Features

CapabilityiOSAndroidmacOSLinuxWindows
Speech-to-Text
Text-to-Speech
LLM
Vision Models
Tool Calling
Embeddings🔜🔜🔜🔜🔜
Multi-Model Pipelines (MMP)
Model Download & Caching
Hardware AccelerationMetal, ANECPUMetal, ANECPU, opt-in VulkanCPU

SDK MMP support: Flutter ✅ · Rust ✅ · Kotlin 🔜 · Swift 🔜 · Unity 🔜

Tool calling: local models call functions you define — your tools are plain data and the loop is your code. See the Tool Calling guide.


Why Xybrid?

  • Private / offline — inference runs on-device and keeps working with no network after the first model download.
  • One API, five platforms — iOS, Android, macOS, Linux, Windows.
  • Many backends, one API — ONNX Runtime, llama.cpp (GGUF), whisper.cpp, Candle and CoreML.
  • Multi-model pipelines — chain ASR → LLM → TTS in one call.
  • Tool calling — local models call functions you define, on every SDK.
  • Swap models without shipping an app — models resolve from the registry at runtime and cache on device.
  • Cloud fallback — opt in per run (docs).
  • Telemetry you control — opt-in behind an API key (docs).
  • Hardware acceleration — Metal and the Apple Neural Engine on Apple, opt-in Vulkan on Linux; Android and Windows are CPU today (docs).

How it compares

XybridOllamallama.cppONNX Runtime
Mobile (iOS/Android)
Game engine (Unity)
Multi-model pipelines (MMP)
ASR + TTS + LLM in one SDK
Runs in-process (no server)
No cloud required

Community

Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines on setting up your development environment, submitting pull requests, and adding new models.

New here? Browse the good first issue label for small, self-contained tasks. Tasks are also grouped by area: area: core, area: sdk, area: examples, area: bindings, area: tests. Medium-difficulty tasks live under help wanted.

Star History

Star history for xybrid-ai/xybrid

License

Apache License 2.0 — see LICENSE for details.

Contributors

theGlenn

718 commits

sammous

36 commits

chimbiwide

6 commits

xybrid-ai/xybrid

Cross-platform on-device AI toolkit

448

stars

778

commits

Rust

primary language

Sep 11, 2026

updated

xybrid.ai
ai-games
edge-ai
ios
kotlin
llamacpp
llm
mobile-llm
ollama
on-device-ai
on-device-ml
onnx-runtime
privacy
privacy-tools
rust
swift
unity3d
unity-ai
voice-ai
voice-assistant

README

English · 简体中文 · 日本語

Xybrid Logo

Xybrid

Run LLMs, ASR, and TTS natively in apps and games.
Flutter · Swift · Kotlin · Unity · Rust
Private, offline, no cloud required.

Docs Website Follow on X Discord

Build License OpenSSF Scorecard OpenSSF Best Practices
Release crates.io pub.dev Maven Central Swift Package Manager
Ask DeepWiki Stars Visitors

Desktop demo     Android demo

Quick Start

Install and run a model in your language of choice.

Flutter SDK Swift SDK Kotlin SDK Unity SDK
Rust crate Python SDK Web SDK preview CLI

Each badge links to its platform setup. See the full Installation Guide for all options.

Flutter

Install in pubspec.yaml:

dependencies:
  xybrid_flutter: ^0.6.0

Run a model:

final model = await Xybrid.model('kokoro-82m').load();
final result = await model.run(XybridEnvelope.text('Hello world'));
// result → 24kHz WAV audio

Kotlin

Install in build.gradle.kts:

dependencies {
    implementation("ai.xybrid:xybrid-kotlin:0.6.0")
}

Run a model:

val model = Xybrid.model("kokoro-82m").load()
val result = model.runAsync(Envelope.text("Hello world"))
// result → 24kHz WAV audio

Swift

Install in Package.swift:

dependencies: [
    .package(url: "https://github.com/xybrid-ai/xybrid.git", from: "0.6.0")
]

Run a model:

let model = try await Xybrid.model("kokoro-82m").load()
let result = try await model.runAsync(envelope: Envelope.text("Hello world"))
// result → 24kHz WAV audio

Unity

Game demo

Install via OpenUPM (recommended):

openupm add ai.xybrid.sdk

Or add https://package.openupm.com as a scoped registry for scope ai.xybrid.

Install manually — add the git subfolder as a UPM package:

https://github.com/xybrid-ai/xybrid.git?path=/bindings/unity

Native libraries download automatically on import. See the Unity SDK guide for details.

Run a model:

var model = XybridClient.LoadModel("kokoro-82m");
var result = model.Run(Envelope.Text("Hello world"));
// result → 24kHz WAV audio

Rust

Install in Cargo.toml:

[dependencies]
xybrid = "0.6.0"

Run a model:

let model = Xybrid::model("kokoro-82m").load()?;
let result = model.run(&Envelope::text("Hello world"))?;
// result → 24kHz WAV audio

CLI

Install:

# macOS / Linux
curl -sSL https://raw.githubusercontent.com/xybrid-ai/xybrid/master/install.sh | sh
# Windows (PowerShell)
irm https://raw.githubusercontent.com/xybrid-ai/xybrid/master/install.ps1 | iex

Run a model:

xybrid run --model kokoro-82m --input-text "Hello world" -o output.wav

Multi-Model Inference Pipelines — MMP (Experimental)

Chain models together into a single multi-model inference pipeline (MMP) — build a voice assistant in 3 lines of YAML:

# voice-assistant.yaml
name: voice-assistant
stages:
  - model: whisper-tiny-ggml  # Speech → text
  - model: qwen2.5-0.5b       # Process with LLM
  - model: kokoro-82m         # Text → speech

CLI:

xybrid run --config voice-assistant.yaml --input-audio question.wav -o response.wav

Flutter:

final pipeline = Xybrid.pipeline(yaml: yamlString);
final result = await pipeline.run(XybridEnvelope.audio(bytes: audioBytes, sampleRate: 16000));

Kotlin:

// Multi-model pipeline (MMP) support coming soon — use single model loading for now

Swift:

// Multi-model pipeline (MMP) support coming soon — use single model loading for now

Unity (C#):

// Multi-model pipeline (MMP) support coming soon — use single model loading for now

Rust:

let pipeline = Xybrid::pipeline(&yaml_string).load()?;
pipeline.load_models()?;
let result = pipeline.run(&Envelope::audio(audio_bytes))?;

Supported Models

All models run entirely on-device. No cloud, no API keys required. Browse the full catalogue at xybrid.ai/models, or run xybrid models list.

Speech-to-Text

ModelParamsDescription
Whisper Tiny39MMultilingual transcription on whisper.cpp — in every platform preset
Wav2Vec2 Base95MEnglish ASR with CTC decoding

Text-to-Speech

ModelParamsDescription
Kokoro 82M82MHigh-quality, 24 natural voices
KittenTTS Nano15MUltra-lightweight, 8 voices
NeuTTS Nano120MCodec TTS with voice cloning

LLM

ModelParamsDescription
LFM2.5 230M230MLiquid AI's smallest hybrid conv+attention LLM — 9 languages, tool calling
LFM2.5 350M354MSame architecture, more headroom — 9 languages, tool calling
LFM2.5 1.2B Instruct1.2BAgentic tasks and data extraction
LFM2.5 1.2B Thinking1.2BReasoning model — chain-of-thought via reasoningContent (guide)
SmolLM2 360M360MBest tiny LLM, excellent quality/size ratio
FunctionGemma 270M270MPurpose-built for function calling
Gemma 3 1B1BGoogle's mobile-optimized LLM, 32K context
Gemma 4 E2B5.1BGoogle's compact multimodal LLM, 2.3B effective params
Gemma 4 E4B8BGoogle's mid-range multimodal LLM, 4.5B effective params
Llama 3.2 1B1BMeta's general purpose, 128K context
Qwen 3.5 0.8B800MReasoning (thinking mode), 201 languages
Qwen 3.5 2B2BLarger Qwen 3.5 with extended reasoning
Bonsai 27B27BPrismML's 1-bit multimodal LLM (text + vision), hybrid attention

Vision-Language

ModelParamsDescription
LFM2-VL 450M450MLiquid AI's compact VLM (SigLIP2 vision)
LFM2.5-VL 3B3BLarger Liquid VLM for local inference

Tool calling: see the Tool Calling guide.

Bring Your Own Model (Experimental)

Note: BYM support is experimental. The model_metadata.json schema is stable, but the AI-assisted tooling (/xybrid-init) is under active development and may not handle all model types yet.

Xybrid works with any ONNX, GGUF, or SafeTensors model. You just need a model_metadata.json that tells xybrid how to run it.

With an AI assistant (Claude Code, Codex, etc.):

# Install xybrid skills into your project
curl -sSL https://raw.githubusercontent.com/xybrid-ai/xybrid/master/tools/scripts/install-skills.sh | sh

# Generate model_metadata.json from a HuggingFace model
claude /xybrid-init hexgrad/Kokoro-82M-v1.0-ONNX

Skills are agent-agnostic and live in agents/skills/. The installer symlinks them for Claude Code (.claude/skills) and Codex (.codex/skills).

Manually — create model_metadata.json in your model directory:

{
  "model_id": "my-model",
  "version": "1.0",
  "execution_template": { "type": "Onnx", "model_file": "model.onnx" },
  "preprocessing": [],
  "postprocessing": [],
  "files": ["model.onnx"],
  "metadata": { "task": "text-generation" }
}

See the model metadata docs for the full schema, or look at existing examples in integration-tests/fixtures/models/.


Features

CapabilityiOSAndroidmacOSLinuxWindows
Speech-to-Text
Text-to-Speech
LLM
Vision Models
Tool Calling
Embeddings🔜🔜🔜🔜🔜
Multi-Model Pipelines (MMP)
Model Download & Caching
Hardware AccelerationMetal, ANECPUMetal, ANECPU, opt-in VulkanCPU

SDK MMP support: Flutter ✅ · Rust ✅ · Kotlin 🔜 · Swift 🔜 · Unity 🔜

Tool calling: local models call functions you define — your tools are plain data and the loop is your code. See the Tool Calling guide.


Why Xybrid?

  • Private / offline — inference runs on-device and keeps working with no network after the first model download.
  • One API, five platforms — iOS, Android, macOS, Linux, Windows.
  • Many backends, one API — ONNX Runtime, llama.cpp (GGUF), whisper.cpp, Candle and CoreML.
  • Multi-model pipelines — chain ASR → LLM → TTS in one call.
  • Tool calling — local models call functions you define, on every SDK.
  • Swap models without shipping an app — models resolve from the registry at runtime and cache on device.
  • Cloud fallback — opt in per run (docs).
  • Telemetry you control — opt-in behind an API key (docs).
  • Hardware acceleration — Metal and the Apple Neural Engine on Apple, opt-in Vulkan on Linux; Android and Windows are CPU today (docs).

How it compares

XybridOllamallama.cppONNX Runtime
Mobile (iOS/Android)
Game engine (Unity)
Multi-model pipelines (MMP)
ASR + TTS + LLM in one SDK
Runs in-process (no server)
No cloud required

Community

Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines on setting up your development environment, submitting pull requests, and adding new models.

New here? Browse the good first issue label for small, self-contained tasks. Tasks are also grouped by area: area: core, area: sdk, area: examples, area: bindings, area: tests. Medium-difficulty tasks live under help wanted.

Star History

Star history for xybrid-ai/xybrid

License

Apache License 2.0 — see LICENSE for details.

Contributors

theGlenn

718 commits

sammous

36 commits

chimbiwide

6 commits

Languages

Rust

70.3%

Dart

7.0%

C

4.5%

C#

3.7%

TypeScript

2.9%

Python

2.8%

Kotlin

2.1%

Swift

1.9%

Starlark

1.9%

Shell

1.5%