Instructions to use fr0stbit3/laya-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 fr0stbit3/laya-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 fr0stbit3/laya-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf fr0stbit3/laya-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 fr0stbit3/laya-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf fr0stbit3/laya-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 fr0stbit3/laya-gguf:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf fr0stbit3/laya-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 fr0stbit3/laya-gguf:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf fr0stbit3/laya-gguf:Q4_K_M
Use Docker
docker model run hf.co/fr0stbit3/laya-gguf:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use fr0stbit3/laya-gguf with Ollama:
ollama run hf.co/fr0stbit3/laya-gguf:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use fr0stbit3/laya-gguf with Docker Model Runner:
docker model run hf.co/fr0stbit3/laya-gguf:Q4_K_M
- Lemonade
How to use fr0stbit3/laya-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull fr0stbit3/laya-gguf:Q4_K_M
Run and chat with the model
lemonade run user.laya-gguf-Q4_K_M
List all available models
lemonade list
- Atomic Chat
GGUF conversion of convaiinnovations/laya (Apache-2.0), f16, via llama.cpp
convert_hf_to_gguf.py.laya-F16.gguf(and the quants) hold the ModernBERT backbone only, and load in llama.cpp asmodern-bert(use--embeddings --pooling none). The decision head and config are in the sibling filelaya-head.safetensors(like anmmprojfile); read it withlaya_head.py(load_head(path)returns config + head weights under the original PyTorch names). The head itself must run outside llama.cpp. Lightly tested: outputs matched the original on a limited set (100 AG News + 100 DAIR Emotion samples, a few examples); may need further testing. Quantized files (laya-Q8_0.gguf,-Q6_K.gguf,-Q4_K_M.gguf;laya-F16.ggufis the unquantized 16-bit original conversion) are made withllama-quantizefrom the f16 file and are even less tested: checked on a single example only, where Q8_0/Q6_K stayed close to f16 and Q4_K_M drifted slightly more (probabilities shifted by up to about 0.02 to 0.03, and score outputs by about 0.04). Prefer f16 or Q8_0 for anything important, and verify Q4_K_M on your own data.
Quant check (single example: the HF README ticket "Duplicate charge on invoice 4411"; department=billing probability, urgency score 0-2, churn_risk noul; head weights from the head file, backbone in llama.cpp). One example only, not a benchmark.
| file | size | billing p | urgency | churn |
|---|---|---|---|---|
| HF original (PyTorch) | - | 0.967 | 1.630 | 0.198 |
| F16 | 933M | 0.966 | 1.631 | 0.201 |
| Q8_0 | 563M | 0.967 | 1.637 | 0.198 |
| Q6_K | 485M | 0.970 | 1.650 | 0.198 |
| Q4_K_M | 414M | 0.967 | 1.601 | 0.219 |
llama.cpp quickstart
# 1. serve the backbone (per-token hidden states; -ub must cover your longest input)
llama-server -m laya-F16.gguf --embeddings --pooling none -c 2048 -ub 2048 -b 2048 --port 8080
# 2. python deps for the decision head + tokenizer
pip install laya requests torch safetensors
# quickstart.py: llama.cpp backbone + Laya head from the sibling head file
import types, requests, torch, laya
from laya_head import load_head
HEAD = "laya-head.safetensors"
agent = laya.load("convaiinnovations/laya", device="cpu") # builds the head architecture + tokenizer/prompt logic
# swap in the decision-head weights from the head file
_, head = load_head(HEAD)
sd = agent.model.state_dict()
for k, v in head.items():
if k in sd: sd[k].copy_(v)
# swap the PyTorch encoder for the llama.cpp server
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 types.SimpleNamespace(last_hidden_state=torch.stack(out))
agent.model.encoder.forward = llamacpp_encoder
result = agent.predict(
{"subject": "Duplicate charge on invoice 4411",
"body": "We were billed twice for March. Please refund the duplicate."},
{"department": {"type": "choice", "instructions": "Which team should handle this?",
"criteria": {"billing": "invoices, payments, refunds",
"technical": "bugs and outages", "sales": "pricing"}}},
)
print(result["answers"]["department"]["choice"]) # billing
Notes: the laya package still downloads the original weights once (for the head architecture and tokenizer); inference runs the backbone in llama.cpp. Tokenize with the HF tokenizer and send token ids ("content": [ids]) as above. A native Go/C++ head is not provided.
Original model
Full model card, usage, benchmarks and license terms: convaiinnovations/laya.
- Downloads last month
- 1,222
4-bit
6-bit
8-bit
16-bit
Model tree for fr0stbit3/laya-gguf
Base model
convaiinnovations/laya