Instructions to use APEXE3HQ/sec10k-analyst-2b 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 APEXE3HQ/sec10k-analyst-2b 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 APEXE3HQ/sec10k-analyst-2b:F16 # Run inference directly in the terminal: llama cli -hf APEXE3HQ/sec10k-analyst-2b:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf APEXE3HQ/sec10k-analyst-2b:F16 # Run inference directly in the terminal: llama cli -hf APEXE3HQ/sec10k-analyst-2b:F16
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 APEXE3HQ/sec10k-analyst-2b:F16 # Run inference directly in the terminal: ./build/bin/llama cli -hf APEXE3HQ/sec10k-analyst-2b:F16
Use Docker
docker model run hf.co/APEXE3HQ/sec10k-analyst-2b:F16
- Llama new
- LM Studio
- Jan
- Ollama
How to use APEXE3HQ/sec10k-analyst-2b with Ollama:
ollama run hf.co/APEXE3HQ/sec10k-analyst-2b:F16
- Unsloth Desktop
- Pi
How to use APEXE3HQ/sec10k-analyst-2b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf APEXE3HQ/sec10k-analyst-2b:F16
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:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "APEXE3HQ/sec10k-analyst-2b:F16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use APEXE3HQ/sec10k-analyst-2b with Docker Model Runner:
docker model run hf.co/APEXE3HQ/sec10k-analyst-2b:F16
- Lemonade
How to use APEXE3HQ/sec10k-analyst-2b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull APEXE3HQ/sec10k-analyst-2b:F16
Run and chat with the model
lemonade run user.sec10k-analyst-2b-F16
List all available models
lemonade list
- Hermes Agent
How to use APEXE3HQ/sec10k-analyst-2b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf APEXE3HQ/sec10k-analyst-2b:F16
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:9931/v1 hermes config set model.default APEXE3HQ/sec10k-analyst-2b:F16
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use APEXE3HQ/sec10k-analyst-2b with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf APEXE3HQ/sec10k-analyst-2b:F16
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:9931/v1 \ --custom-model-id "APEXE3HQ/sec10k-analyst-2b:F16" \ --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 serving/launch.py from APEXE3HQ/sec10k-analyst-2b: direct link, hf CLI and curl.
- Browser
- Download file 4.55 kB
-
https://huggingface.co/APEXE3HQ/sec10k-analyst-2b/resolve/main/serving/launch.py
- Command line
-
hf download hf://APEXE3HQ/sec10k-analyst-2b/serving/launch.py
-
curl -L -o launch.py https://huggingface.co/APEXE3HQ/sec10k-analyst-2b/resolve/main/serving/launch.py
4.55 kB
| #!/usr/bin/env python3 | |
| """Start SEC 10-K Analyst 2B: all six roles on one GPU (NVIDIA CUDA or Apple Metal), or on the processor. | |
| One 4-bit base model is loaded once; the nine LoRA adapters share it. Serves on localhost: | |
| 8186 planner, 8188 figure lookups, 8189 text answers, 8190 section reading, | |
| 8191 writer and calculator, 8192 label picker (8194 and 8195 are internal). | |
| SEC10K_INSTANCE=N runs another copy beside the first: every port moves up by 100 x (N - 1). | |
| SEC10K_DEVICE=cpu runs on the processor (no GPU needed, much slower); SEC10K_THREADS sets its threads. | |
| """ | |
| import argparse | |
| import os | |
| import sys | |
| import time | |
| from pathlib import Path | |
| HERE = Path(__file__).resolve().parent | |
| ROOT = HERE.parent | |
| sys.path[:0] = [str(HERE), str(HERE / "vendor"), str(ROOT / "app" / "workflow")] | |
| ENDPOINTS = 8 # 8194, 8192, 8195 and the five chat ports | |
| INSTANCE = int(os.environ.get("SEC10K_INSTANCE", "1") or 1) | |
| OFFSET = 100 * (INSTANCE - 1) | |
| CPU = os.environ.get("SEC10K_DEVICE", "").lower() == "cpu" | |
| def resolve(name, out_dir): | |
| """Write a copy of a manifest with its paths pointing into this download.""" | |
| path = out_dir / name | |
| path.write_text((HERE / name).read_text().replace("{ROOT}", ROOT.as_posix())) | |
| return path | |
| def main(): | |
| parser = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter) | |
| parser.add_argument("--chat-slots", type=int, choices=(1, 2), default=2, | |
| help="chat requests served at once (default 2, as in the published runs; 1 uses less memory)") | |
| parser.add_argument("--picker-context", type=int, choices=(4096, 8192), default=8192, | |
| help="token limit of the label picker's two-way context (default 8192, as in the published runs; " | |
| "4096 uses about 4 GB less GPU memory and still fits every picker input seen in testing)") | |
| args = parser.parse_args() | |
| run_dir = HERE / ".run" | |
| run_dir.mkdir(exist_ok=True) | |
| selector = resolve("selector_manifest.json", run_dir) | |
| chat = resolve("chat_manifest.json", run_dir) | |
| import chat_runtime | |
| import runtime | |
| import service | |
| if args.picker_context != 8192: | |
| # The two-way (non-causal) context must hold a whole picker input in one batch, and llama.cpp reserves its score | |
| # buffer for that many tokens times the 248K-word vocabulary. A smaller limit shrinks that buffer. | |
| create_context = runtime.NativeBackend.create_context | |
| def smaller_two_way_context(self, model, *, causal, n_ctx, n_ubatch, **options): | |
| if not causal: | |
| n_ctx = n_ubatch = args.picker_context | |
| return create_context(self, model, causal=causal, n_ctx=n_ctx, n_ubatch=n_ubatch, **options) | |
| runtime.NativeBackend.create_context = smaller_two_way_context | |
| class Chat(chat_runtime.SharedChatRuntime): | |
| def __init__(self, runtime, manifest, pool_size=1, context_limit=8192): | |
| super().__init__(runtime, manifest, pool_size=args.chat_slots, context_limit=context_limit) | |
| chat_runtime.SharedChatRuntime = Chat | |
| started, bound = time.time(), [] | |
| class Server(service.ThreadingHTTPServer): | |
| def __init__(self, server_address, handler, *rest, **options): | |
| host, port = server_address | |
| super().__init__((host, port + OFFSET), handler, *rest, **options) | |
| def server_bind(self): | |
| super().server_bind() | |
| bound.append(self.server_address[1]) | |
| if len(bound) == ENDPOINTS: | |
| copy = f" Copy {INSTANCE}, ports {8186 + OFFSET}-{8195 + OFFSET}." if OFFSET else "" | |
| print(f"Ready in {time.time() - started:.0f} s.{copy} In another terminal: python ask.py \"your question\"" | |
| " (Ctrl+C here to stop)", flush=True) | |
| service.ThreadingHTTPServer = Server | |
| where = f"on the processor, {os.environ.get('SEC10K_THREADS', '8')} threads" if CPU else "on the GPU" | |
| print(f"Loading the 4-bit base and its nine adapters {where} (chat slots {args.chat_slots}, " | |
| f"picker context {args.picker_context}) ...", flush=True) | |
| try: | |
| service.main(["--manifest", str(selector), "--port", "8194", | |
| "--picker-source-dir", str(HERE / "picker_source"), "--alias-port", "8192", | |
| "--chat-manifest", str(chat), "--chat-port", "8195", "--chat-aliases", | |
| "--chat-context-limit", "65536"]) | |
| except KeyboardInterrupt: | |
| print("Stopped.") | |
| if __name__ == "__main__": | |
| main() | |