AI Skill Hub 推荐使用:yzma 是一款优质的AI工具。AI 综合评分 7.5 分,在同类工具中表现稳健。如果你正在寻找可靠的AI工具解决方案,这是一个值得深入了解的选择。
yzma 是一款基于 Go 开发的开源工具,专注于 Go、Llama.cp、AI 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
yzma 是一款基于 Go 开发的开源工具,专注于 Go、Llama.cp、AI 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
# 方式一:go install(推荐) go install github.com/hybridgroup/yzma@latest # 方式二:从源码编译 git clone https://github.com/hybridgroup/yzma cd yzma go build -o yzma . # 方式三:下载预编译二进制 # 访问 Releases 页面下载对应平台二进制文件 # https://github.com/hybridgroup/yzma/releases
# 查看帮助 yzma --help # 基本运行 yzma [options] <input> # 详细使用说明请查阅文档 # https://github.com/hybridgroup/yzma
# yzma 配置说明 # 查看配置选项 yzma --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export YZMA_CONFIG="/path/to/config.yml"
yzma lets you write Go applications that directly integrate llama.cpp for fully local inference using hardware acceleration.
yzma uses the purego and ffi packages so CGo is not needed.llama.cpp releases so you can use the latest features, performance improvements, and bugfixes.This example uses the SmolLM2-135M-GGUF model:
package main
import (
"fmt"
"os"
"path/filepath"
"github.com/hybridgroup/yzma/pkg/download"
"github.com/hybridgroup/yzma/pkg/llama"
)
var (
modelFile = "SmolLM2-135M.Q4_K_M.gguf"
prompt = "Are you ready to go?"
libPath = os.Getenv("YZMA_LIB")
responseLength int32 = 12
)
func main() {
llama.Load(libPath)
llama.LogSet(llama.LogSilent())
llama.Init()
model, _ := llama.ModelLoadFromFile(filepath.Join(download.DefaultModelsDir(), modelFile), llama.ModelDefaultParams())
ctx, _ := llama.InitFromModel(model, llama.ContextDefaultParams())
vocab := llama.ModelGetVocab(model)
tokens := llama.Tokenize(vocab, prompt, true, false)
batch := llama.BatchGetOne(tokens)
sampler := llama.SamplerChainInit(llama.SamplerChainDefaultParams())
llama.SamplerChainAdd(sampler, llama.SamplerInitGreedy())
for pos := int32(0); pos < responseLength; pos += batch.NTokens {
llama.Decode(ctx, batch)
token := llama.SamplerSample(sampler, ctx, -1)
if llama.VocabIsEOG(vocab, token) {
fmt.Println()
break
}
buf := make([]byte, 36)
len := llama.TokenToPiece(vocab, token, buf, 0, true)
fmt.Print(string(buf[:len]))
batch = llama.BatchGetOne([]llama.Token{token})
}
fmt.Println()
}
Install yzma, then download the model using the yzma command line tool:
$ yzma model get -u https://huggingface.co/QuantFactory/SmolLM2-135M-GGUF/resolve/main/SmolLM2-135M.Q4_K_M.gguf
And run the Go program:
$ go run ./examples/hello/
"Yes, I'm ready to go."
Sometimes there are breaking changes to llama.cpp that require an update to yzma. Here are some of the known compatible versions:
| llama.cpp | yzma |
|---|---|
| ? - b8864 | v1.12.0 |
| b8865 - b9179 | v1.13.0 |
| b9180 - b9459 | v1.14.1 |
| b9460 - b9540 | v1.15.0 |
| b9541 - b9548 | v1.16.0 |
| b9549 - b9561 | v1.16.1 |
| b9562 - b9611 | v1.17.0 |
| b9616+ | v1.17.1 |
You can use the convenient yzma command line tool to download the llama.cpp prebuilt libraries for your platform. You can also have your application self-download them automatically at installation time, including auto-detection for CUDA and ROCm.
See INSTALL.md for installation instructions for macOS, Linux, and Windows.
We also have specific information on running yzma on Raspberry Pi, NVIDIA Jetson Orin, and the Arduino UNO Q.
We have several examples of how you can use yzma in our examples directory.
This example uses the Qwen2.5-VL-3B-Instruct-Q8_0 VLM model to process both a text prompt and an image, then displays the result.
$ go run ./examples/vlm/ -model ~/models/Qwen2.5-VL-3B-Instruct-Q8_0.gguf -mmproj ~/models/mmproj-Qwen2.5-VL-3B-Instruct-Q8_0.gguf -image ./images/domestic_llama.jpg -p "What is in this picture?"
The image features a white llama standing in a fenced-in area, possibly a zoo or a farm. The llama is positioned in the center of the image, with its body facing the right side. The fenced area is surrounded by trees, creating a natural environment for the llama.
You can use yzma to do inference on text language models. This example uses the qwen2.5-0.5b-instruct-fp16.gguf model for an interactive chat session.
$ go run ./examples/chat/ -model ./models/qwen2.5-0.5b-instruct-fp16.gguf
Enter prompt: Are you ready to go?
Yes, I'm ready to go! What would you like to do?
Enter prompt: Let's go to the zoo
Great! Let's go to the zoo. What would you like to see?
Enter prompt: I want to feed the llama
Sure! Let's go to the zoo and feed the llama. What kind of llama are you interested in feeding?
See the examples directory for more examples of how to use yzma.
yzma是一个集成Llama.cp的Go应用,具有较高的实用价值
该工具使用 NOASSERTION 协议,商用场景请仔细阅读协议条款,必要时咨询法律意见。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
📄 NOASSERTION — 请查阅原始协议条款了解具体使用限制。
总体来看,yzma 是一款质量良好的AI工具,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。
| 原始名称 | yzma |
| 原始描述 | 开源AI工具:Go with your own intelligence - Go applications that directly integrate llama.cp。⭐497 · Go |
| Topics | GoLlama.cpAI |
| GitHub | https://github.com/hybridgroup/yzma |
| License | NOASSERTION |
| 语言 | Go |
收录时间:2026-06-13 · 更新时间:2026-06-16 · License:NOASSERTION · AI Skill Hub 不对第三方内容的准确性作法律背书。