Instructions to use apus-ailab/APUS-OpenJev-v1-4B-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 apus-ailab/APUS-OpenJev-v1-4B-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 apus-ailab/APUS-OpenJev-v1-4B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf apus-ailab/APUS-OpenJev-v1-4B-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf apus-ailab/APUS-OpenJev-v1-4B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf apus-ailab/APUS-OpenJev-v1-4B-GGUF:Q4_K_M
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 apus-ailab/APUS-OpenJev-v1-4B-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf apus-ailab/APUS-OpenJev-v1-4B-GGUF:Q4_K_M
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 apus-ailab/APUS-OpenJev-v1-4B-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf apus-ailab/APUS-OpenJev-v1-4B-GGUF:Q4_K_M
Use Docker
docker model run hf.co/apus-ailab/APUS-OpenJev-v1-4B-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use apus-ailab/APUS-OpenJev-v1-4B-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "apus-ailab/APUS-OpenJev-v1-4B-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": "apus-ailab/APUS-OpenJev-v1-4B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/apus-ailab/APUS-OpenJev-v1-4B-GGUF:Q4_K_M
- Ollama
How to use apus-ailab/APUS-OpenJev-v1-4B-GGUF with Ollama:
ollama run hf.co/apus-ailab/APUS-OpenJev-v1-4B-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use apus-ailab/APUS-OpenJev-v1-4B-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf apus-ailab/APUS-OpenJev-v1-4B-GGUF:Q4_K_M
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": "apus-ailab/APUS-OpenJev-v1-4B-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use apus-ailab/APUS-OpenJev-v1-4B-GGUF with Docker Model Runner:
docker model run hf.co/apus-ailab/APUS-OpenJev-v1-4B-GGUF:Q4_K_M
- Lemonade
How to use apus-ailab/APUS-OpenJev-v1-4B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull apus-ailab/APUS-OpenJev-v1-4B-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.APUS-OpenJev-v1-4B-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use apus-ailab/APUS-OpenJev-v1-4B-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 apus-ailab/APUS-OpenJev-v1-4B-GGUF:Q4_K_M
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 apus-ailab/APUS-OpenJev-v1-4B-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use apus-ailab/APUS-OpenJev-v1-4B-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf apus-ailab/APUS-OpenJev-v1-4B-GGUF:Q4_K_M
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 "apus-ailab/APUS-OpenJev-v1-4B-GGUF:Q4_K_M" \ --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: 3,847 Bytes
4a9fded | 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 | """Small shared contract. Prompts use a strict whitelist of input fields."""
import json
import math
PROMPT_VERSION = "jev.dynamic.prompt.v2"
LABELS = tuple("ABCDEFGHIJKLMNOP")
BINARY_CRITERIA = [
{"id": "yes", "description": "The stated proposition is true."},
{"id": "no", "description": "The stated proposition is false."},
]
def validate_request(record):
for key in ("id", "group_id", "state", "instructions"):
if not isinstance(record.get(key), str) or not record[key].strip():
raise ValueError(f"{key} must be a nonempty string")
if record.get("primitive") not in ("choice", "noul", "score_level"):
raise ValueError("unsupported primitive")
criteria = record.get("criteria")
if not isinstance(criteria, list) or not 2 <= len(criteria) <= len(LABELS):
raise ValueError("criteria must contain 2..16 candidates")
ids = []
for candidate in criteria:
if not isinstance(candidate, dict):
raise TypeError("candidate must be an object")
for key in ("id", "description"):
if not isinstance(candidate.get(key), str) or not candidate[key].strip():
raise ValueError(f"candidate {key} must be nonempty")
ids.append(candidate["id"])
if len(set(ids)) != len(ids):
raise ValueError("duplicate candidate ids")
if record["primitive"] != "choice" and criteria != BINARY_CRITERIA:
raise ValueError("noul and score_level require canonical yes/no criteria")
def validate_record(record):
validate_request(record)
if record.get("gold") not in [c["id"] for c in record["criteria"]]:
raise ValueError("gold must be a candidate id")
if not isinstance(record.get("provenance"), dict):
raise TypeError("provenance must be an object")
def label_mapping(record):
validate_request(record)
return dict(zip(LABELS, (c["id"] for c in record["criteria"])))
def render_prompt_parts(record):
"""Text prefix/suffix; callers MUST check tokenizer boundary equivalence."""
validate_request(record)
prefix = "Shared state:\n" + record["state"] + "\n\n"
task = {
"primitive": record["primitive"],
"instructions": record["instructions"],
"criteria": [
{"label": label, "description": candidate["description"]}
for label, candidate in zip(LABELS, record["criteria"])
],
}
suffix = json.dumps(task, ensure_ascii=False, sort_keys=True)
suffix += (
"\nReturn only the selected letter: "
+ ", ".join(LABELS[: len(record["criteria"])])
+ ".\nAnswer:"
)
return prefix, suffix
def render_prompt(record):
return "".join(render_prompt_parts(record))
def to_messages(record):
validate_record(record)
inverse = {candidate: label for label, candidate in label_mapping(record).items()}
return {
"messages": [
{"role": "user", "content": render_prompt(record)},
{"role": "assistant", "content": inverse[record["gold"]]},
]
}
def format_response(record, probabilities):
"""Map ordered candidate probabilities; score_level is NOT aggregate Score."""
mapping = label_mapping(record)
values = list(probabilities)
if len(values) != len(mapping) or any(
not math.isfinite(p) or p < 0 or p > 1 for p in values
):
raise ValueError("invalid probabilities")
if not math.isclose(sum(values), 1, abs_tol=1e-5):
raise ValueError("probabilities must sum to one")
distribution = dict(zip(mapping.values(), values))
result = {"type": record["primitive"], "probabilities": distribution}
if record["primitive"] == "choice":
result["choice"] = max(distribution, key=distribution.get)
else:
result["yes_probability"] = distribution["yes"]
return result
|