Instructions to use Weidows/laya-multilingual-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Weidows/laya-multilingual-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Weidows/laya-multilingual-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf Weidows/laya-multilingual-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Weidows/laya-multilingual-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf Weidows/laya-multilingual-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf Weidows/laya-multilingual-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Weidows/laya-multilingual-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf Weidows/laya-multilingual-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Weidows/laya-multilingual-GGUF:Q4_K_M
Use Docker
docker model run hf.co/Weidows/laya-multilingual-GGUF:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use Weidows/laya-multilingual-GGUF with Ollama:
ollama run hf.co/Weidows/laya-multilingual-GGUF:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use Weidows/laya-multilingual-GGUF with Docker Model Runner:
docker model run hf.co/Weidows/laya-multilingual-GGUF:Q4_K_M
- Lemonade
How to use Weidows/laya-multilingual-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Weidows/laya-multilingual-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.laya-multilingual-GGUF-Q4_K_M
List all available models
lemonade list
- Atomic Chat
laya-multilingual GGUF
GGUF conversion of convaiinnovations/laya-multilingual (Apache-2.0), encoder only (mmBERT-base, 22 layers, hidden 768). Bit-identical to an independent community conversion (134/134 tensors, max diff 0).
The decision head (36 tensors, 30 MB) ships separately as laya-multilingual-head.safetensors
(same split as an mmproj file); laya_head.py has load_head(path) returning
config + weights under original PyTorch names.
Token ids must come from the shipped HF tokenizer.json (Gemma-style tokenizer;
llama.cpp text tokenization not reliable for this vocab).
Files
| file | size | worst rel err vs F16 (dequant) |
|---|---|---|
| laya-multilingual-F16.gguf | 629 MB | - |
| laya-multilingual-Q8_0.gguf | 341 MB | 4.2e-03 |
| laya-multilingual-Q6_K.gguf | 271 MB | 1.6e-02 |
| laya-multilingual-Q5_K_M.gguf | 258 MB | 3.7e-02 |
| laya-multilingual-Q4_K_M.gguf | 249 MB | 7.5e-02 |
| laya-multilingual-Q4_K_M-imat.gguf | 249 MB | 1.3e-01 (worst-tensor rel err; imatrix shifts bits to sensitive weights) |
| laya-multilingual-Q4_K_S.gguf | 242 MB | 7.5e-02 |
| laya-multilingual-Q3_K_M.gguf | 236 MB | 1.9e-01 |
| laya-multilingual-IQ4_XS.gguf | 236 MB | 8.4e-02 |
| laya-multilingual-IQ4_XS-imat.gguf | 235 MB | 3.5e-01 (worst-tensor rel err) |
imatrix stats from 400-line 10-language Wikipedia sample (imatrix-laya.dat used at quant time;
dat file not shipped). Weight-space rel err is a smoke signal only โ see eval below.
Eval (end-to-end, llama.cpp server + original decision head)
12 samples (6 XNLI choice across en/zh/ar/hi/es/ja + 3 dept choice + 3 urgency noul),
same HF token ids into PyTorch FP32 and each GGUF via llama.cpp server (--pooling none,
--embd-normalize -1), identical head weights. F16 matches FP32 exactly (12/12, drift 0.0015).
| quant | decision agreement | mean conf drift |
|---|---|---|
| F16 | 12/12 (1.00) | 0.0015 |
| Q8_0 | 12/12 (1.00) | 0.0043 |
| Q6_K | 11/12 (0.92) | 0.0103 |
| Q5_K_M | 12/12 (1.00) | 0.0309 |
| Q4_K_M | 12/12 (1.00) | 0.0381 |
| Q4_K_M-imat | 12/12 (1.00) | 0.0347 |
| Q4_K_S | 12/12 (1.00) | 0.0407 |
| Q3_K_M | 10/12 (0.83) | 0.0891 |
| IQ4_XS | 12/12 (1.00) | 0.0157 |
| IQ4_XS-imat | 12/12 (1.00) | 0.0167 |
Mismatches only in Q6_K (1 hi) and Q3_K_M (1 ar + 1 hi, drift 0.34+). Recommendation: Q8_0 for anything important; Q4_K_M-imat / IQ4_XS-imat for size; avoid Q3_K_M on non-English.
Use
llama-server -m laya-multilingual-Q8_0.gguf --embeddings --pooling none -c 2048 -ub 2048 -b 2048 --port 8080
pip install laya requests torch safetensors
import requests, torch, laya
from laya_head import load_head
agent = laya.load("convaiinnovations/laya-multilingual", device="cpu")
_, head = load_head("laya-multilingual-head.safetensors")
sd = agent.model.state_dict()
for k, v in head.items():
if k in sd:
sd[k].copy_(v)
D = agent.model.encoder.config.hidden_size
def llamacpp_encoder(input_ids, attention_mask=None, **_):
out = []
for i, row in enumerate(input_ids):
n = int(attention_mask[i].sum())
r = requests.post("http://localhost:8080/embedding", json={"content": [row[:n].tolist()]}).json()
h = torch.zeros(input_ids.shape[1], D); h[:n] = torch.tensor(r[0]["embedding"]); out.append(h)
return torch.stack(out)
- Downloads last month
- 1,691
3-bit
4-bit
5-bit
6-bit
8-bit
16-bit
Model tree for Weidows/laya-multilingual-GGUF
Base model
convaiinnovations/laya-multilingual