models
БесплатноБез исполняемых скриптовНе проверенUse when a LocalAI server needs a model - find one in the model gallery, install it, follow the install job, change a model's configuration, or give a model a…
от mudler★ 50 644 звезды на GitHubОб этом скилле
Find, install and configure LocalAI models
A model in LocalAI is a YAML configuration file in the models folder, plus the weights it names. The model gallery lists ready-made configurations. Installing a gallery entry downloads the weights and writes the YAML.
Full docs: https://localai.io/docs/models/ and https://localai.io/docs/models/setting-up-models/
These steps use the admin API. With API keys on, send an administrator key:
LOCALAI=http://localhost:8080
AUTH="Authorization: Bearer $LOCALAI_API_KEY"
1. See what is installed
curl -s $LOCALAI/v1/models -H "$AUTH" | jq -r '.data[].id'
If the model is in the list, you are done. Do not install it again.
2. Find a model in the gallery
GET /models/available returns every gallery entry. It is a long list: filter it with jq.
curl -s $LOCALAI/models/available -H "$AUTH" \
| jq -r '.[] | select(.name | test("qwen"; "i")) | "\(.gallery.name)@\(.name) \(.size // "")"'
Search by tag (for example llm, embeddings, tts, stt, image):
curl -s $LOCALAI/models/available -H "$AUTH" \
| jq -r '.[] | select((.tags // []) | index("embeddings")) | .name'
Pick one name. Prefer a small model when the user did not ask for a size. If several names match, show the user the short list and ask.
The web UI has the same list on the Models page. Browse the gallery file: https://github.com/mudler/LocalAI/blob/master/gallery/index.yaml
3. Install it
curl -s $LOCALAI/models/apply -H "$AUTH" \
-H "Content-Type: application/json" \
-d '{"id": "localai@gemma-4-e2b-it-qat-q4_0"}'
idis<gallery>@<name>. The gallery part is optional; without it, the first gallery that has the name wins.- Add
"name": "my-name"to install it under another name. - Some entries have several builds (
variants). LocalAI picks the best one that this machine can run. To force one, add"variant": "<variant name>". - Add
"overrides": {"context_size": 8192}to change fields of the YAML at install time.
The answer has a job ID:
{"uuid": "1059474d-...", "status": "http://localhost:8080/models/jobs/1059474d-..."}
4. Follow the job
JOB=1059474d-...
curl -s $LOCALAI/models/jobs/$JOB -H "$AUTH" | jq '{processed, progress, message, error}'
processed: false: still running. Check again after a few seconds.progressis a percentage.processed: trueand noerror: installed. The model is now in/v1/models.errorset: the install failed. Tell the user the error. Do not retry in a loop.
A large model can take many minutes to download. Wait between checks.
5. Use it
Call it by its name, as any OpenAI model:
curl -s $LOCALAI/v1/chat/completions -H "$AUTH" \
-H "Content-Type: application/json" \
-d '{"model": "gemma-4-e2b-it-qat-q4_0", "messages": [{"role": "user", "content": "Hi"}]}'
The first call loads the model, so it is slower.
Change a model's configuration
Read the configuration as JSON:
curl -s $LOCALAI/api/models/config-json/MODEL -H "$AUTH"
Change only the fields you send. The server merges them, checks the result and writes the YAML:
curl -s -X PATCH $LOCALAI/api/models/config-json/MODEL -H "$AUTH" \
-H "Content-Type: application/json" \
-d '{"context_size": 16384}'
A change reloads the model, so the next call is slower. Field reference: https://localai.io/docs/models/model-configuration/
A minimal YAML in the models folder:
name: my-model
backend: llama-cpp
parameters:
model: my-model.Q4_K_M.gguf
context_size: 8192
Give a model a second name (alias)
An alias sends every call for one name to another model. Clients that ask for gpt-4 get my-model. Write gpt-4.yaml in the models folder:
name: gpt-4
alias: my-model
The target must be a real, enabled model, not another alias. Details: https://localai.io/docs/models/model-aliases/
Remove a model
curl -s -X POST $LOCALAI/models/delete/MODEL -H "$AUTH"
Ask the user before you remove a model.
On the server machine
The CLI does the same, on the machine that has the models folder:
local-ai models list
local-ai models install gemma-4-e2b-it-qat-q4_0
local-ai run gemma-4-e2b-it-qat-q4_0
Errors
| You see | Do this |
|---|---|
401 or 403 on /models/... |
These routes need an administrator. Ask one. |
The name is not in /models/available |
Search again with a shorter word. Do not invent a name. |
The job error says a backend is missing |
The backend for this model is not installed and could not be installed. Tell the user the backend name. |
The job error says there is not enough memory |
Pick a smaller model or a smaller quantization. |
Установить models в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл models?
Use when a LocalAI server needs a model - find one in the model gallery, install it, follow the install job, change a model's configuration, or give a model a second name with an alias.
Как установить скилл models?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл models запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic