← 开源
withcatai

node-llama-cpp

Run AI models locally on your machine with node.js bindings for llama.cpp. Enforce a JSON schema on the model output on the generation level

AI EngineeringAccess modelsTypeScript
在 GitHub 打开
增长势头
+124 小时新增 Star+0.0%
2.19k
Star
227
Fork
+0
本周
16
贡献者
创建于 2023-08-12 · 更新于 2026-10-15 · 今日第 5150 名
主要开发者
giladgdido-plutogounthar

withcatai/node-llama-cpp 排名第 5,150,有 2,189 个星标。

同类别比较

withcatai/node-llama-cpp 排名第 5,150,此处有 8 个同类条目;ggml-org/llama.vim 排名第 5,152。

同类别比较
名称排名指标
datapizza-labs/datapizza-ai5,123
语言:
Python
星标数:
2,243
分叉数:
143
简介:
Build reliable Gen AI solutions without overhead 🍕
microsoft/kernel-memory5,128
语言:
C#
星标数:
2,232
分叉数:
421
简介:
Research project. A Memory solution for users, teams, and applications.
numman-ali/opencode-openai-codex-auth5,136
语言:
TypeScript
星标数:
2,214
分叉数:
154
简介:
OAuth authentication plugin for personal coding assistance with ChatGPT Plus/Pro subscriptions - uses OpenAI's official authentication method
nonebot/nonebot5,142
语言:
Python
星标数:
2,206
分叉数:
329
简介:
基于 OneBot 标准的 Python 异步 QQ 机器人框架 / Asynchronous QQ robot framework based on OneBot for Python
ggml-org/llama.vim5,152
语言:
Vim Script
星标数:
2,188
分叉数:
128
简介:
Vim plugin for LLM-assisted code/text completion
appeeky/aso-skills5,157
语言:
MDX
星标数:
2,181
分叉数:
129
简介:
AI agent skills for App Store Optimization (ASO) and app marketing. Built for indie developers, app marketers, and growth teams who want Cursor, Claude Code, or any Agent Skills-compatible AI assistant to help with keyword research, metadata optimization, competitor analysis, and app growth.
JuneYaooo/nihaisha-nishi-tcm5,159
语言:
Python
星标数:
2,175
分叉数:
470
简介:
倪海厦中医课程资料的 Agent Skill:支持课程检索、方证穴位辨析、学习笔记整理与板书截图证据索引。 | An Agent Skill for Ni Haisha TCM course study, formula-pattern lookup, acupoint reference, and screenshot evidence indexing.
containers/kubernetes-mcp-server5,162
语言:
Go
星标数:
2,162
分叉数:
459
简介:
Model Context Protocol (MCP) server for Kubernetes and OpenShift
关键参数与规格
关键参数与规格
参数值
语言TypeScript
类别AI Engineering
子类别Access models
星标数2,189
分叉数227
贡献者16
创建日期2023-08-12
更新日期2026-10-15
1 天星标数1
7 天星标数0
排名5,150
上次排名5,320
排名变化170
7 天星标排名12,121
上次 7 天星标排名12,178
7 天星标排名变化57
总星标排名5,908
上次总星标排名5,903
总星标排名变化-5
README 摘录

✨ **New:** Structured Decisions with any model ✨ Features Run LLMs locally on your machine Metal, CUDA and Vulkan support Pre-built binaries are provided, with a fallback to building from source _**without**_ or Python Adapts to your hardware automatically, no need to configure anything A Complete suite of everything you need to use LLMs in your projects Use the CLI to chat with a model without writing any code Up-to-date with the latest . Download and compile the latest release

with a single CLI command Enforce a model to generate output in a parseable format, like JSON, or even force it to follow a specific JSON schema Provide a model with functions it can call on demand to retrieve information or perform actions Embedding and reranking support Structured decisions support with any model Safe against special token injection attacks Great developer experience with full TypeScript support, and complete documentation Much more Documentation Getting started guide API reference CLI help Blog

Changelog Roadmap Try It Without Installing Chat with a model in your terminal using a single command: Installation This package comes with pre-built binaries for macOS, Linux and Windows. If binaries are not available for your platform, it'll fallback to download a release of and build it from source with . To disable this behavior, set the environment variable to . Usage For more examples, see the getting started guide Contributing To contribute to read the contribution guide.

常见问题

记录了多少星标和分叉?

withcatai/node-llama-cpp 有 2,189 个星标和 227 个分叉。

仓库排名是多少?

withcatai/node-llama-cpp 排名第 5,150。

记录的语言和类别是什么?

withcatai/node-llama-cpp 有 2,189 个星标,语言为 TypeScript,类别为 AI Engineering。

哪个仓库排名最接近?

withcatai/node-llama-cpp 与 ggml-org/llama.vim 比较,后者排名第 5,152,有 2,188 个星标。

README
[![node-llama-cpp Logo](https://raw.githubusercontent.com/withcatai/node-llama-cpp/master/assets/logo.v3.roundEdges.avif)](https://node-llama-cpp.withcat.ai)

node-llama-cpp

Run AI models locally on your machine

Pre-built bindings are provided with a fallback to building from source with cmake

✨ New: Structured Decisions with any model ✨

Features

Documentation

Try It Without Installing

Chat with a model in your terminal using a single command:

npx -y node-llama-cpp chat

Installation

npm install node-llama-cpp

This package comes with pre-built binaries for macOS, Linux and Windows.

If binaries are not available for your platform, it'll fallback to download a release of llama.cpp and build it from source with cmake. To disable this behavior, set the environment variable NODE_LLAMA_CPP_SKIP_DOWNLOAD to true.

Usage

import {fileURLToPath} from "url";
import path from "path";
import {getLlama, LlamaChatSession} from "node-llama-cpp";

const __dirname = path.dirname(fileURLToPath(import.meta.url));

const llama = await getLlama();
const model = await llama.loadModel({
    modelPath: path.join(__dirname, "models", "Meta-Llama-3.1-8B-Instruct.Q4_K_M.gguf")
});
const context = await model.createContext();
const session = new LlamaChatSession({
    contextSequence: context.getSequence()
});


const q1 = "Hi there, how are you?";
console.log("User: " + q1);

const a1 = await session.prompt(q1);
console.log("AI: " + a1);


const q2 = "Summarize what you said";
console.log("User: " + q2);

const a2 = await session.prompt(q2);
console.log("AI: " + a2);

For more examples, see the getting started guide

Contributing

To contribute to node-llama-cpp read the contribution guide.

Acknowledgements

  • llama.cpp: ggml-org/llama.cpp

      If you like this repo, star it ✨                                                    
    
排名相邻
同类项目