Instructions to use eyad-silx/progress 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 eyad-silx/progress 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 eyad-silx/progress # Run inference directly in the terminal: llama cli -hf eyad-silx/progress
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf eyad-silx/progress # Run inference directly in the terminal: llama cli -hf eyad-silx/progress
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 eyad-silx/progress # Run inference directly in the terminal: ./build/bin/llama cli -hf eyad-silx/progress
Use Docker
docker model run hf.co/eyad-silx/progress
- Llama new
- LM Studio
- Jan
- Ollama
How to use eyad-silx/progress with Ollama:
ollama run hf.co/eyad-silx/progress
- Unsloth Desktop
- Pi
How to use eyad-silx/progress with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf eyad-silx/progress
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": "eyad-silx/progress" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use eyad-silx/progress with Docker Model Runner:
docker model run hf.co/eyad-silx/progress
- Lemonade
How to use eyad-silx/progress with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull eyad-silx/progress
Run and chat with the model
lemonade run user.progress-{{QUANT_TAG}}List all available models
lemonade list
- Hermes Agent
How to use eyad-silx/progress with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf eyad-silx/progress
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 eyad-silx/progress
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use eyad-silx/progress with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf eyad-silx/progress
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 "eyad-silx/progress" \ --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"
push artifacts/scripts/eval_seq.py
Browse files- artifacts/scripts/eval_seq.py +120 -0
artifacts/scripts/eval_seq.py
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Sequential-batch eval harness for a single-GPU box: batches of samples go teacher (concurrent
|
| 2 |
+
vLLM) -> king reads -> challenger reads -> compare, keeping states files within the TTL and the
|
| 3 |
+
shm budget. Same scoring as the eval service.
|
| 4 |
+
|
| 5 |
+
.venv/bin/python eval_seq.py --dataset pick20.jsonl --teacher DIR --king DIR --challenger DIR
|
| 6 |
+
[--samples N] [--batch 8] [--workers 8] [--out results.jsonl]
|
| 7 |
+
"""
|
| 8 |
+
from __future__ import annotations
|
| 9 |
+
|
| 10 |
+
import argparse
|
| 11 |
+
import json
|
| 12 |
+
import time
|
| 13 |
+
from concurrent.futures import ThreadPoolExecutor
|
| 14 |
+
from pathlib import Path
|
| 15 |
+
|
| 16 |
+
from eval_service import dataset, metrics, run, servers
|
| 17 |
+
from eval_service.run import Distance, _render, generate, load_tokenizer
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
def aggregate(sums: list, role: str) -> Distance:
|
| 21 |
+
rows = [by_role[role] for by_role in sums if role in by_role]
|
| 22 |
+
if not rows:
|
| 23 |
+
return Distance(kl=float("inf"), dist=float("inf"))
|
| 24 |
+
return Distance(
|
| 25 |
+
kl=sum(s.kl for s in rows) / sum(s.predictions for s in rows),
|
| 26 |
+
dist=sum(s.layer_mean_dist for s in rows) / max(sum(s.activations for s in rows), 1),
|
| 27 |
+
)
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
def main() -> None:
|
| 31 |
+
ap = argparse.ArgumentParser()
|
| 32 |
+
ap.add_argument("--dataset", type=Path, required=True)
|
| 33 |
+
ap.add_argument("--teacher", type=Path, required=True)
|
| 34 |
+
ap.add_argument("--king", type=Path, required=True)
|
| 35 |
+
ap.add_argument("--challenger", type=Path, required=True)
|
| 36 |
+
ap.add_argument("--samples", type=int, default=20)
|
| 37 |
+
ap.add_argument("--batch", type=int, default=8)
|
| 38 |
+
ap.add_argument("--workers", type=int, default=8)
|
| 39 |
+
ap.add_argument("--out", type=Path, default=Path("eval_seq.jsonl"))
|
| 40 |
+
args = ap.parse_args()
|
| 41 |
+
|
| 42 |
+
samples = dataset.load(args.dataset).samples[: args.samples]
|
| 43 |
+
tokenizer = load_tokenizer(args.teacher)
|
| 44 |
+
models = {"teacher": args.teacher, "king": args.king, "challenger": args.challenger}
|
| 45 |
+
device = "cuda:0"
|
| 46 |
+
heads = metrics.heads(models, [device])
|
| 47 |
+
all_sums = []
|
| 48 |
+
records_out = []
|
| 49 |
+
|
| 50 |
+
try:
|
| 51 |
+
for b0 in range(0, len(samples), args.batch):
|
| 52 |
+
batch = samples[b0 : b0 + args.batch]
|
| 53 |
+
records = []
|
| 54 |
+
groups = servers.serve({"teacher": args.teacher})
|
| 55 |
+
with ThreadPoolExecutor(args.workers) as pool:
|
| 56 |
+
def one(i, sample, prompt):
|
| 57 |
+
answer, tpath = generate(groups["teacher"], prompt, i, sample.id)
|
| 58 |
+
for _ in range(120): # the connector writes states asynchronously
|
| 59 |
+
if Path(tpath).exists():
|
| 60 |
+
break
|
| 61 |
+
time.sleep(0.5)
|
| 62 |
+
keep = Path("/root/states") / Path(tpath).name
|
| 63 |
+
keep.write_bytes(Path(tpath).read_bytes())
|
| 64 |
+
Path(str(keep) + ".lock").touch()
|
| 65 |
+
return answer, str(keep)
|
| 66 |
+
|
| 67 |
+
futures = {i: (s, p, pool.submit(one, b0 + i, s, p)) for i, (s, p) in enumerate((sample, _render(tokenizer, sample.messages, sample.tools)) for sample in batch)}
|
| 68 |
+
for i, (sample, prompt, fut) in futures.items():
|
| 69 |
+
answer, tpath = fut.result()
|
| 70 |
+
records.append({"id": sample.id, "prompt": prompt, "answer": answer, "tpath": tpath})
|
| 71 |
+
print(f"teacher {b0+i+1}/{len(samples)}: {sample.id} p{len(prompt)} a{len(answer)}", flush=True)
|
| 72 |
+
servers.release("teacher")
|
| 73 |
+
|
| 74 |
+
for role, dir_ in (("king", args.king), ("challenger", args.challenger)):
|
| 75 |
+
groups = servers.serve({role: dir_})
|
| 76 |
+
group = groups[role]
|
| 77 |
+
for i, rec in enumerate(records):
|
| 78 |
+
read, path = group.complete(rec["prompt"], len(rec["answer"]), b0 + i, rec["prompt"] + rec["answer"])
|
| 79 |
+
if read != rec["answer"]:
|
| 80 |
+
raise SystemExit(f"{role} left the teacher's answer on {rec['id']}")
|
| 81 |
+
rec[role] = path
|
| 82 |
+
print(f"{role} {b0+i+1}/{len(samples)}: {rec['id']}", flush=True)
|
| 83 |
+
servers.release(role)
|
| 84 |
+
|
| 85 |
+
for rec in records:
|
| 86 |
+
read = rec["prompt"] + rec["answer"][:-1]
|
| 87 |
+
states = {
|
| 88 |
+
role: metrics.load_states(rec[role] if role != "teacher" else rec["tpath"], read, len(rec["prompt"]) - 1)
|
| 89 |
+
for role in ("teacher", "king", "challenger")
|
| 90 |
+
}
|
| 91 |
+
by_role = metrics.compare(states, heads[device], rec["answer"], device)
|
| 92 |
+
all_sums.append(by_role)
|
| 93 |
+
records_out.append({"id": rec["id"], **{role: s.summary() for role, s in by_role.items()}})
|
| 94 |
+
print(
|
| 95 |
+
f"scored {rec['id']}: king KL {by_role['king'].kl / by_role['king'].predictions:.4f}"
|
| 96 |
+
f" challenger KL {by_role['challenger'].kl / by_role['challenger'].predictions:.4f}",
|
| 97 |
+
flush=True,
|
| 98 |
+
)
|
| 99 |
+
for p in (rec["tpath"], rec["king"], rec["challenger"]):
|
| 100 |
+
servers.discard(p)
|
| 101 |
+
|
| 102 |
+
agg = {role: aggregate(all_sums, role) for role in ("teacher", "king", "challenger")}
|
| 103 |
+
for role, d in agg.items():
|
| 104 |
+
print(f"{role:12s} KL {d.kl:.6f} distance {d.dist:.5f}")
|
| 105 |
+
if agg["king"].kl < float("inf"):
|
| 106 |
+
need = Distance(kl=0.015 * agg["king"].kl, dist=0.0084 * agg["king"].dist)
|
| 107 |
+
print(
|
| 108 |
+
f"margin needed: KL {need.kl:.6f} dist {need.dist:.6f} ;"
|
| 109 |
+
f" challenger leads by KL {agg['king'].kl - agg['challenger'].kl:.6f}"
|
| 110 |
+
f" ({100 * (agg['king'].kl - agg['challenger'].kl) / agg['king'].kl:.3f}%)"
|
| 111 |
+
f" dist {agg['king'].dist - agg['challenger'].dist:.6f}"
|
| 112 |
+
f" ({100 * (agg['king'].dist - agg['challenger'].dist) / agg['king'].dist:.3f}%)"
|
| 113 |
+
)
|
| 114 |
+
args.out.write_text("".join(json.dumps(r, ensure_ascii=False) + "\n" for r in records_out))
|
| 115 |
+
finally:
|
| 116 |
+
servers.stop_all()
|
| 117 |
+
|
| 118 |
+
|
| 119 |
+
if __name__ == "__main__":
|
| 120 |
+
main()
|