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/experiments/16_reconstruct/bench.py from miutti/intel-mac-local-llm: direct link, hf CLI and curl.
- Browser
- Download file 2.99 kB
-
https://huggingface.co/miutti/intel-mac-local-llm/resolve/main/source/experiments/16_reconstruct/bench.py
- Command line
-
hf download hf://miutti/intel-mac-local-llm/source/experiments/16_reconstruct/bench.py
-
curl -L -o bench.py https://huggingface.co/miutti/intel-mac-local-llm/resolve/main/source/experiments/16_reconstruct/bench.py
2.99 kB
| import os | |
| """実験16: 出力再構成の効果。 | |
| これまで: min‖W−Ŵ‖(重み誤差) | |
| 今回: min‖(W−Ŵ)X‖(出力誤差) X=本物の活性化 | |
| 採点は必ず「別の活性化」で行う。較正データで採点すると自己採点になる。 | |
| """ | |
| import json, os, sys, time | |
| ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) | |
| sys.path.insert(0, os.path.join(ROOT, "lib")) | |
| import numpy as np | |
| import gguf, wcodec as C, rotate, reconstruct as RC | |
| MODEL = (os.environ.get("MODEL_BLOB") or "/path/to/localai/ollama-models/blobs/" | |
| "sha256-4a188102020e9c9530b687fd6400f775c45e90a0d7baafe65bd0a36963fbb7ba") | |
| acts = np.load(os.path.join(ROOT, "data/calib/acts256.npz")) | |
| r_ = gguf.Reader(MODEL) | |
| def inner_rotate(A, B, seed=0): | |
| r = A.shape[1]; d = rotate.signs(r, seed); s = 1/np.sqrt(r) | |
| return rotate.fwht(A)*d*s, (rotate.fwht(B.T).T)*d[:, None]*s | |
| def old_way(W, rank, k, cb, G, seed=0): | |
| """従来: 重み誤差を最小化(SVD+k-means)""" | |
| out, inn = W.shape | |
| r = 1 << (min(rank, min(out, inn)//2).bit_length()-1) | |
| U, S, Vt = np.linalg.svd(W, full_matrices=False) | |
| A, B = inner_rotate(U[:, :r]*S[:r], Vt[:r], seed) | |
| Aq = C.rtn(A, 4, min(G, A.shape[1]))[0] | |
| Bq = C.rtn(B, 4, min(G, B.shape[1]))[0] | |
| Dp = W - Aq@Bq | |
| pad = (-inn) % G | |
| if pad: Dp = np.pad(Dp, ((0,0),(0,pad))) | |
| Res, _, _ = C.pvq(Dp, k=k, cb_bits=cb, G=G, seed=seed) | |
| Wh = Aq@Bq + Res[:, :inn] | |
| lr = r*(out+inn)*4/(out*inn) | |
| ovh = 16*(Aq.size/min(G,Aq.shape[1])+Bq.size/min(G,Bq.shape[1]))/(out*inn) | |
| return Wh.astype(np.float32), lr+cb/k+16.0/G+ovh | |
| rows = [] | |
| print(f"{'層':<26}{'方式':<10}{'bit':>6}{'出力誤差(別データ)':>18}{'改善':>9}") | |
| print("-"*72) | |
| for name in ["blk.0.ffn_gate.weight", "blk.10.attn_q.weight", | |
| "blk.20.attn_output.weight", "blk.35.attn_q.weight"]: | |
| if name not in acts: continue | |
| W, _ = r_.load(name); W = np.ascontiguousarray(W.astype(np.float32)) | |
| Xall = acts[name].T.astype(np.float32) # (in, sample) | |
| n = Xall.shape[1] | |
| Xtr, Xte = Xall[:, :n//2], Xall[:, n//2:] # 較正用と採点用を分ける | |
| def score(Wh): | |
| d = (W-Wh)@Xte; b = W@Xte | |
| return float(np.linalg.norm(d)/np.linalg.norm(b)) | |
| base = None | |
| for tag, fn in [("従来", lambda: old_way(W, 32, 8, 8, 256)), | |
| ("再構成", lambda: RC.fit(W, Xtr, rank=32, k=8, cb_bits=8, G=256)[:2])]: | |
| t0=time.time(); Wh, bpw = fn(); e = score(Wh) | |
| mark = "(基準)" if base is None else f"{100*(base-e)/base:+.1f}%" | |
| if base is None: base = e | |
| print(f"{name:<26}{tag:<10}{bpw:>6.3f}{e:>18.4f}{mark:>9}") | |
| rows.append(dict(層=name, 方式=tag, bpw=round(float(bpw),4), 誤差=round(e,5))) | |
| json.dump(rows, open(os.path.join(os.path.dirname(os.path.abspath(__file__)), | |
| "results","recon.json"),"w"), ensure_ascii=False, indent=2) | |
| print("\n保存完了") | |