oncethink
248 天前
推荐 tabby ,可以本地代码问答和,如果内存在 16GB 或以下,建议用 1.5b 的模型,再大速度就很慢了。
如果使用 macOS ,直接用 brew install tabbyml/tabby/tabby ,然后访问后台注册账户,在设置界面拿到 token ,然后在 vscode 中装上 tabby 扩展,填入本地 tabby 服务地址和 token
如果使用 ollama 做后端,可以参考下面配置:
下面是一个使用 qwen2.5-coder:7b 的参考配置,你需要先用 ollama pull qwen2.5-coder:7b-base 和 qwen2.5-coder:7b ,前者适合做补全,后者适合做问答。
~/.tabby/config.toml
```
# Completion model
[model.completion.http]
kind = "ollama/completion"
model_name = "qwen2.5-coder:7b-base"
api_endpoint = "http://localhost:11434"
# prompt_template 不同的模型配置可能不一样,需要自己注意一下
prompt_template = "<|fim_prefix|>{prefix}<|fim_suffix|>{suffix}<|fim_middle|>"
# Embedding model
[model.embedding.http]
kind = "ollama/embedding"
model_name = "bge-m3:latest"
api_endpoint = "http://localhost:11434"
# Chat model
[model.chat.http]
kind = "openai/chat"
model_name = "qwen2.5-coder:7b"
api_endpoint = "http://localhost:11434/v1"
```