Text Generation
GGUF
Japanese
English
llama.cpp
Mixture of Experts
expert-pruning
intel-mac
cpu
local-agent
imatrix
conversational
Instructions to use miutti/intel-mac-local-llm 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 miutti/intel-mac-local-llm 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 miutti/intel-mac-local-llm:UD-Q2_K_XL # Run inference directly in the terminal: llama cli -hf miutti/intel-mac-local-llm:UD-Q2_K_XL
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf miutti/intel-mac-local-llm:UD-Q2_K_XL # Run inference directly in the terminal: llama cli -hf miutti/intel-mac-local-llm:UD-Q2_K_XL
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 miutti/intel-mac-local-llm:UD-Q2_K_XL # Run inference directly in the terminal: ./llama-cli -hf miutti/intel-mac-local-llm:UD-Q2_K_XL
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 miutti/intel-mac-local-llm:UD-Q2_K_XL # Run inference directly in the terminal: ./build/bin/llama-cli -hf miutti/intel-mac-local-llm:UD-Q2_K_XL
Use Docker
docker model run hf.co/miutti/intel-mac-local-llm:UD-Q2_K_XL
- LM Studio
- Jan
- vLLM
How to use miutti/intel-mac-local-llm with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "miutti/intel-mac-local-llm" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "miutti/intel-mac-local-llm", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/miutti/intel-mac-local-llm:UD-Q2_K_XL
- Ollama
How to use miutti/intel-mac-local-llm with Ollama:
ollama run hf.co/miutti/intel-mac-local-llm:UD-Q2_K_XL
- Unsloth Desktop
- Pi
How to use miutti/intel-mac-local-llm with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf miutti/intel-mac-local-llm:UD-Q2_K_XL
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": "miutti/intel-mac-local-llm:UD-Q2_K_XL" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use miutti/intel-mac-local-llm with Docker Model Runner:
docker model run hf.co/miutti/intel-mac-local-llm:UD-Q2_K_XL
- Lemonade
How to use miutti/intel-mac-local-llm with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull miutti/intel-mac-local-llm:UD-Q2_K_XL
Run and chat with the model
lemonade run user.intel-mac-local-llm-UD-Q2_K_XL
List all available models
lemonade list
- Hermes Agent
How to use miutti/intel-mac-local-llm with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf miutti/intel-mac-local-llm:UD-Q2_K_XL
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 miutti/intel-mac-local-llm:UD-Q2_K_XL
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use miutti/intel-mac-local-llm with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf miutti/intel-mac-local-llm:UD-Q2_K_XL
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 "miutti/intel-mac-local-llm:UD-Q2_K_XL" \ --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"
Download source/lib/entropy.py from miutti/intel-mac-local-llm: direct link, hf CLI and curl.
- Browser
- Download file 4.21 kB
-
https://huggingface.co/miutti/intel-mac-local-llm/resolve/main/source/lib/entropy.py
- Command line
-
hf download hf://miutti/intel-mac-local-llm/source/lib/entropy.py
-
curl -L -o entropy.py https://huggingface.co/miutti/intel-mac-local-llm/resolve/main/source/lib/entropy.py
4.21 kB
| """コード番号列をさらに縮める(=「右クリックで圧縮」を専用設計にしたもの)。 | |
| 積量子化の出力は「コード番号の列」。この番号は均等に使われていないので、 | |
| よく出る番号に短いビットを割り当てれば、名目ビット数より小さくできる。 | |
| さらに隣の番号との相関を使えばもっと縮む。 | |
| """ | |
| import heapq | |
| import subprocess | |
| import numpy as np | |
| def entropy(counts): | |
| """理想的なエントロピー符号化での平均ビット数(下限)。""" | |
| c = np.asarray(counts, np.float64) | |
| c = c[c > 0] | |
| p = c / c.sum() | |
| return float(-(p * np.log2(p)).sum()) | |
| def huffman_bits(idx, ncode): | |
| """実際のハフマン符号での平均ビット数(整数長の制約つき=現実の値)。""" | |
| counts = np.bincount(idx, minlength=ncode) | |
| nz = [(int(c), i) for i, c in enumerate(counts) if c > 0] | |
| if len(nz) == 1: | |
| return 1.0 | |
| # マージ1回ごとに、その部分木に属する全要素の符号長が1増える。 | |
| # よってマージ重みの総和 = 総ビット数。 | |
| heap = [(c, i) for c, i in nz] | |
| heapq.heapify(heap) | |
| total = 0 | |
| while len(heap) > 1: | |
| a = heapq.heappop(heap) | |
| b = heapq.heappop(heap) | |
| m = a[0] + b[0] | |
| total += m # マージ1回ごとに深さ+1が全要素に効く | |
| heapq.heappush(heap, (m, -1)) | |
| return total / counts.sum() | |
| # ★ 2026-09-07 の注記: この関数は idx を1本の列とみなして隣どうしの遷移を数える。 | |
| # グループ(テンソルや行)を並べて渡すと、**あるグループの最後と次の先頭**を | |
| # つながっているものとして数えてしまう。グループ数が多いほど薄まるが、 | |
| # 短いグループを大量に渡すときは 別々に呼ぶこと。 | |
| def conditional_entropy(idx, ncode): | |
| """直前のコードで条件づけたエントロピー(文脈モデル=専用圧縮器の肝)。""" | |
| a = idx[:-1].astype(np.int64) | |
| b = idx[1:].astype(np.int64) | |
| # ★ 2026-09-07 追加: ncode が大きいと ncode×ncode の表がメモリを食い尽くす。 | |
| # ncode=2**16 なら 42.9億要素=数十GB。黙って落ちる前に断る。 | |
| if ncode > 4096: | |
| raise ValueError( | |
| "ncode=%d は大きすぎます(%d×%d の表を作ろうとしています)。" | |
| "疎な数え方に替えるか、ncode を下げてください。" % (ncode, ncode, ncode)) | |
| joint = np.bincount(a * ncode + b, minlength=ncode * ncode).reshape(ncode, ncode) | |
| tot = joint.sum() | |
| if tot == 0: | |
| return 0.0 | |
| row = joint.sum(1) | |
| h = 0.0 | |
| for i in range(ncode): | |
| if row[i] == 0: | |
| continue | |
| h += (row[i] / tot) * entropy(joint[i]) | |
| return float(h) | |
| def generic_compress(idx, ncode, tool): | |
| """汎用圧縮器(xz / zstd)に素のバイト列を食わせた場合の実測ビット数。""" | |
| bits = max(1, int(np.ceil(np.log2(ncode)))) | |
| if bits <= 8: | |
| raw = idx.astype(np.uint8).tobytes() | |
| else: | |
| raw = idx.astype(np.uint16).tobytes() | |
| try: | |
| cmd = {"xz": ["xz", "-9e", "-c"], "zstd": ["zstd", "-19", "-c", "-q"]}[tool] | |
| out = subprocess.run(cmd, input=raw, stdout=subprocess.PIPE, | |
| stderr=subprocess.DEVNULL, timeout=600).stdout | |
| except (FileNotFoundError, subprocess.TimeoutExpired): | |
| return None | |
| return len(out) * 8 / len(idx) | |
| def analyze(idx, ncode, k, G, tools=("xz",)): | |
| """コード列1本を多角的に評価し、1重みあたりビット数に換算して返す。""" | |
| counts = np.bincount(idx, minlength=ncode) | |
| nominal = np.log2(ncode) | |
| res = { | |
| "名目": nominal / k, | |
| "エントロピー下限": entropy(counts) / k, | |
| "ハフマン": huffman_bits(idx, ncode) / k, | |
| "文脈つき下限": conditional_entropy(idx, ncode) / k, | |
| } | |
| for t in tools: | |
| v = generic_compress(idx, ncode, t) | |
| if v is not None: | |
| res[f"汎用{t}"] = v / k | |
| scale_bits = 16 / G | |
| return {kk: vv + scale_bits for kk, vv in res.items()}, counts | |