{"id":51621366,"url":"https://github.com/ilpeppino/react-native-edge-slm","last_synced_at":"2026-07-12T20:30:27.262Z","repository":{"id":370577615,"uuid":"1295334344","full_name":"ilpeppino/react-native-edge-slm","owner":"ilpeppino","description":"On-device small language models (SLM) for React Native — install, load, stream, benchmark and manage local GGUF models at the edge. Android-first, llama.cpp-first.","archived":false,"fork":false,"pushed_at":"2026-07-09T17:14:34.000Z","size":174,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-09T17:14:44.596Z","etag":null,"topics":["ai","android","edge-ai","gguf","ios","llama-cpp","llm","local-ai","machine-learning","on-device","react-native","react-native-library","slm","small-language-model"],"latest_commit_sha":null,"homepage":"https://github.com/ilpeppino/react-native-edge-slm#readme","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ilpeppino.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"docs/security.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-07-09T14:01:42.000Z","updated_at":"2026-07-09T17:11:12.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ilpeppino/react-native-edge-slm","commit_stats":null,"previous_names":["ilpeppino/react-native-edge-slm"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ilpeppino/react-native-edge-slm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilpeppino%2Freact-native-edge-slm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilpeppino%2Freact-native-edge-slm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilpeppino%2Freact-native-edge-slm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilpeppino%2Freact-native-edge-slm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ilpeppino","download_url":"https://codeload.github.com/ilpeppino/react-native-edge-slm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilpeppino%2Freact-native-edge-slm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35402741,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-12T02:00:06.386Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","android","edge-ai","gguf","ios","llama-cpp","llm","local-ai","machine-learning","on-device","react-native","react-native-library","slm","small-language-model"],"created_at":"2026-07-12T20:30:25.530Z","updated_at":"2026-07-12T20:30:27.251Z","avatar_url":"https://github.com/ilpeppino.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-edge-slm\n\n[![npm version](https://img.shields.io/npm/v/react-native-edge-slm.svg)](https://www.npmjs.com/package/react-native-edge-slm)\n[![CI](https://github.com/ilpeppino/react-native-edge-slm/actions/workflows/ci.yml/badge.svg)](https://github.com/ilpeppino/react-native-edge-slm/actions/workflows/ci.yml)\n[![license: MIT](https://img.shields.io/npm/l/react-native-edge-slm.svg)](./LICENSE)\n\nRun local, on-device LLMs in React Native — install, load, stream, benchmark, and manage\nGGUF models with a small, well-typed API. Android-first, [llama.cpp](https://github.com/ggerganov/llama.cpp)-first.\n\n\u003e **Status:** v0.1.0 — first public release. Full lifecycle + llama.cpp engine, with Android\n\u003e (Kotlin) and iOS (Swift) native modules. The self-hosted `cpp/` backend is a scaffold (see\n\u003e [`docs/cpp-backend.md`](./docs/cpp-backend.md)). See [`docs/`](./docs) for the full design.\n\n## Why\n\n`react-native-edge-slm` is the **model lifecycle \u0026 management layer** for on-device AI:\n\n- **Presets** — describe a model once (`registerPreset`), then install / load / benchmark it by id.\n- **Developer-provided sources** — you point the package at a model URL, a Hugging Face repo,\n  a signed URL, a local file, or an app-bundled asset. The package ships **no model binaries\n  and no model hosting**.\n- **Resumable downloads** into app-private storage, with optional **SHA-256** verification.\n- **Local registry** of installed models (paths, sizes, versions).\n- **Token streaming**, **cancellation**, **unload**, and a basic **benchmark / device-capability** API.\n- **Pluggable runtime backend** — `llama.cpp` (via [`llama.rn`](https://github.com/mybigday/llama.rn))\n  is the first implementation; the `RuntimeBackend` seam lets other engines slot in.\n\nThe actual inference engine is provided by a backend (llama.cpp today). This package focuses\non everything *around* the engine that apps otherwise have to build themselves.\n\n## Quick taste\n\n```ts\nimport { LocalAI } from 'react-native-edge-slm';\n\nLocalAI.registerPreset({\n  id: 'qwen2.5-1.5b-instruct-q4',\n  displayName: 'Qwen2.5 1.5B Instruct (Q4_K_M)',\n  runtime: 'llama.cpp',\n  fileName: 'qwen2.5-1.5b-instruct-q4_k_m.gguf',\n  contextLength: 4096,\n});\n\n// You provide the source — the package never hardcodes model URLs.\nLocalAI.configurePresetSource('qwen2.5-1.5b-instruct-q4', {\n  type: 'url',\n  url: 'https://example.com/models/qwen2.5-1.5b-instruct-q4_k_m.gguf',\n  sha256: '…', // optional integrity check\n});\n\nawait LocalAI.installPreset('qwen2.5-1.5b-instruct-q4', {\n  onProgress: (p) =\u003e console.log(`${Math.round(p.progress * 100)}%`),\n});\n\nconst runtime = await LocalAI.loadPreset('qwen2.5-1.5b-instruct-q4');\nawait runtime.generate({\n  prompt: 'Explain on-device AI in one sentence.',\n  onToken: (t) =\u003e process.stdout.write(t),\n});\nruntime.cancel();       // stop generation\nawait runtime.unload(); // free memory\n```\n\n## Documentation\n\n- [Getting started](./docs/getting-started.md)\n- [Model sources](./docs/model-sources.md)\n- [Presets](./docs/presets.md)\n- [Runtimes \u0026 backends](./docs/runtimes.md)\n- [Android](./docs/android.md)\n- [Security](./docs/security.md)\n\n## You are responsible for model licensing\n\nThis package downloads and runs **models you choose**. You are responsible for complying with\neach model's license and usage terms. The project ships no weights and hosts no models.\n\n## License\n\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filpeppino%2Freact-native-edge-slm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Filpeppino%2Freact-native-edge-slm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filpeppino%2Freact-native-edge-slm/lists"}