Text Generation
GGUF
llama.cpp
pocketpal
on-device
Mixture of Experts
multilingual
quantization
distillation
1-bit
2-bit
3-bit
conversational
Instructions to use RegalInvader/Marco-Nano-Instruct-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 RegalInvader/Marco-Nano-Instruct-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 RegalInvader/Marco-Nano-Instruct-GGUF:TQ1_0 # Run inference directly in the terminal: llama cli -hf RegalInvader/Marco-Nano-Instruct-GGUF:TQ1_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf RegalInvader/Marco-Nano-Instruct-GGUF:TQ1_0 # Run inference directly in the terminal: llama cli -hf RegalInvader/Marco-Nano-Instruct-GGUF:TQ1_0
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf RegalInvader/Marco-Nano-Instruct-GGUF:TQ1_0 # Run inference directly in the terminal: ./build/bin/llama cli -hf RegalInvader/Marco-Nano-Instruct-GGUF:TQ1_0
Use Docker
docker model run hf.co/RegalInvader/Marco-Nano-Instruct-GGUF:TQ1_0
- Llama new
- LM Studio
- Jan
- vLLM
How to use RegalInvader/Marco-Nano-Instruct-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "RegalInvader/Marco-Nano-Instruct-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RegalInvader/Marco-Nano-Instruct-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/RegalInvader/Marco-Nano-Instruct-GGUF:TQ1_0
- Ollama
How to use RegalInvader/Marco-Nano-Instruct-GGUF with Ollama:
ollama run hf.co/RegalInvader/Marco-Nano-Instruct-GGUF:TQ1_0
- Unsloth Desktop
- Pi
How to use RegalInvader/Marco-Nano-Instruct-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf RegalInvader/Marco-Nano-Instruct-GGUF:TQ1_0
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "RegalInvader/Marco-Nano-Instruct-GGUF:TQ1_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use RegalInvader/Marco-Nano-Instruct-GGUF with Docker Model Runner:
docker model run hf.co/RegalInvader/Marco-Nano-Instruct-GGUF:TQ1_0
- Lemonade
How to use RegalInvader/Marco-Nano-Instruct-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull RegalInvader/Marco-Nano-Instruct-GGUF:TQ1_0
Run and chat with the model
lemonade run user.Marco-Nano-Instruct-GGUF-TQ1_0
List all available models
lemonade list
- Hermes Agent
How to use RegalInvader/Marco-Nano-Instruct-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf RegalInvader/Marco-Nano-Instruct-GGUF:TQ1_0
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default RegalInvader/Marco-Nano-Instruct-GGUF:TQ1_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use RegalInvader/Marco-Nano-Instruct-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf RegalInvader/Marco-Nano-Instruct-GGUF:TQ1_0
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "RegalInvader/Marco-Nano-Instruct-GGUF:TQ1_0" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
File size: 5,413 Bytes
e5235fb | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | #!/usr/bin/env python3
"""T0.3 · Fixed item-id files for RS-fast (spec §7), so every run scores the same items.
python -I scripts/prep_rs_subsets.py # downloads ~10 MB of parquet into $MT_DATA/evalsets
- MMLU-Redux 2.0: 1,000 of the items its annotators marked `ok` (label verified), stratified over the
57 subjects (largest-remainder allocation), seed 0.
- Global-MMLU-Lite: all 400 test items for each RS-fast language (the set is already fixed and
human-verified; the file pins the ids and the parquet hash).
- BELEBELE: 200 of the 900 questions, seed 0, the same questions in every RS-fast language (BELEBELE
is fully parallel), so cross-language differences are not item differences.
- GSM8K-250 already exists (configs/eval/subsets/gsm8k_250.json, made for the T1.4 FP8 check).
Parquet comes from the Hub's parquet conversion of a pinned dataset revision; each file's sha256 is
recorded. Downloaded files are data: read with pyarrow only.
"""
from __future__ import annotations
import argparse
import hashlib
import json
import os
import random
import urllib.request
from pathlib import Path
REPO = Path(__file__).resolve().parent.parent
DATA = Path(os.environ.get("MT_DATA", "/path/to/data"))
OUT = REPO / "configs" / "eval" / "subsets"
RS_FAST = ["zh", "ar", "ko", "hu", "bn"] # T0.2 (D-12)
BELEBELE_CFG = {"zh": "zho_Hans", "ar": "arb_Arab", "ko": "kor_Hang", "hu": "hun_Latn", "bn": "ben_Beng",
"en": "eng_Latn"}
REV = {"mmlu_redux": ("edinburgh-dawg/mmlu-redux-2.0", "372ea425445d51e1ba1188c56e5e893f8138621f"),
"global_mmlu_lite": ("CohereLabs/Global-MMLU-Lite", "36c2fd756f19ccf13a9a96c8e53ccecc02192b8b"),
"belebele": ("facebook/belebele", "7899cdfa4e1e0d733fd77c848e2c273cb1d32be2")}
PARQUET = "https://huggingface.co/api/datasets/{ds}/parquet/{cfg}/{split}/0.parquet"
def fetch(url: str, dest: Path) -> str:
dest.parent.mkdir(parents=True, exist_ok=True)
if not dest.exists():
tmp = dest.with_suffix(".part")
urllib.request.urlretrieve(url, tmp)
tmp.rename(dest)
return hashlib.sha256(dest.read_bytes()).hexdigest()
def rows(ds: str, cfg: str, split: str, dest: Path) -> tuple[list[dict], str]:
import pyarrow.parquet as pq
sha = fetch(PARQUET.format(ds=ds, cfg=cfg, split=split), dest)
return pq.read_table(dest).to_pylist(), sha
def write(name: str, obj: dict) -> None:
OUT.mkdir(parents=True, exist_ok=True)
(OUT / name).write_text(json.dumps(obj, indent=1, ensure_ascii=False) + "\n")
print(f"{name}: {obj.get('n')} items")
def allocate(sizes: dict[str, int], total: int) -> dict[str, int]:
"""Largest-remainder allocation of `total` proportional to `sizes`, capped at each size."""
n = sum(sizes.values())
quota = {k: total * v / n for k, v in sizes.items()}
alloc = {k: min(sizes[k], int(q)) for k, q in quota.items()}
for k in sorted(sizes, key=lambda k: (-(quota[k] - int(quota[k])), k)):
if sum(alloc.values()) >= total:
break
if alloc[k] < sizes[k]:
alloc[k] += 1
return alloc
def mmlu_redux(seed: int, n: int) -> None:
import urllib.request as ur
ds, rev = REV["mmlu_redux"]
subjects = sorted(json.loads(ur.urlopen(f"https://huggingface.co/api/datasets/{ds}/parquet").read()))
ok, shas = {}, {}
for s in subjects:
rs, shas[s] = rows(ds, s, "test", DATA / f"evalsets/mmlu_redux/{s}_test.parquet")
ok[s] = [i for i, r in enumerate(rs) if r.get("error_type") == "ok"]
alloc = allocate({s: len(v) for s, v in ok.items()}, n)
rng = random.Random(seed)
items = {s: sorted(rng.sample(ok[s], alloc[s])) for s in subjects}
write("mmlu_redux_1000.json", {"dataset": ds, "revision": rev, "split": "test", "filter": "error_type == ok",
"seed": seed, "n": sum(alloc.values()), "ok_items": sum(map(len, ok.values())),
"parquet_sha256": shas, "ids": items})
def global_mmlu_lite() -> None:
ds, rev = REV["global_mmlu_lite"]
out = {"dataset": ds, "revision": rev, "split": "test", "languages": RS_FAST, "parquet_sha256": {}, "ids": {}}
for lang in RS_FAST:
rs, out["parquet_sha256"][lang] = rows(ds, lang, "test", DATA / f"evalsets/global_mmlu_lite/{lang}_test.parquet")
out["ids"][lang] = [r["sample_id"] for r in rs]
out["n"] = sum(len(v) for v in out["ids"].values())
write("global_mmlu_lite_rs5.json", out)
def belebele(seed: int, n: int) -> None:
ds, rev = REV["belebele"]
out = {"dataset": ds, "revision": rev, "split": "test", "languages": RS_FAST, "seed": seed, "parquet_sha256": {}}
keys = None
for lang in RS_FAST:
cfg = BELEBELE_CFG[lang]
rs, out["parquet_sha256"][lang] = rows(ds, cfg, "test", DATA / f"evalsets/belebele/{cfg}_test.parquet")
k = {(r["link"], r["question_number"]) for r in rs}
keys = k if keys is None else keys & k
pick = sorted(random.Random(seed).sample(sorted(keys), n))
out.update(n=n, parallel_questions=len(keys), ids=[{"link": l, "question_number": q} for l, q in pick])
write("belebele_200.json", out)
def main() -> None:
p = argparse.ArgumentParser()
p.add_argument("--seed", type=int, default=0)
a = p.parse_args()
mmlu_redux(a.seed, 1000)
global_mmlu_lite()
belebele(a.seed, 200)
if __name__ == "__main__":
main()
|