Instructions to use faysalbenahmed/AMF-G1-4B-Experimental with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use faysalbenahmed/AMF-G1-4B-Experimental with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="faysalbenahmed/AMF-G1-4B-Experimental") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("faysalbenahmed/AMF-G1-4B-Experimental") model = AutoModelForCausalLM.from_pretrained("faysalbenahmed/AMF-G1-4B-Experimental", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use faysalbenahmed/AMF-G1-4B-Experimental 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 faysalbenahmed/AMF-G1-4B-Experimental:Q5_K_M # Run inference directly in the terminal: llama cli -hf faysalbenahmed/AMF-G1-4B-Experimental:Q5_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf faysalbenahmed/AMF-G1-4B-Experimental:Q5_K_M # Run inference directly in the terminal: llama cli -hf faysalbenahmed/AMF-G1-4B-Experimental:Q5_K_M
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 faysalbenahmed/AMF-G1-4B-Experimental:Q5_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf faysalbenahmed/AMF-G1-4B-Experimental:Q5_K_M
Use Docker
docker model run hf.co/faysalbenahmed/AMF-G1-4B-Experimental:Q5_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use faysalbenahmed/AMF-G1-4B-Experimental with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "faysalbenahmed/AMF-G1-4B-Experimental" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "faysalbenahmed/AMF-G1-4B-Experimental", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/faysalbenahmed/AMF-G1-4B-Experimental:Q5_K_M
- SGLang
How to use faysalbenahmed/AMF-G1-4B-Experimental with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "faysalbenahmed/AMF-G1-4B-Experimental" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "faysalbenahmed/AMF-G1-4B-Experimental", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "faysalbenahmed/AMF-G1-4B-Experimental" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "faysalbenahmed/AMF-G1-4B-Experimental", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use faysalbenahmed/AMF-G1-4B-Experimental with Ollama:
ollama run hf.co/faysalbenahmed/AMF-G1-4B-Experimental:Q5_K_M
- Unsloth Desktop
- Pi
How to use faysalbenahmed/AMF-G1-4B-Experimental with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf faysalbenahmed/AMF-G1-4B-Experimental:Q5_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": "faysalbenahmed/AMF-G1-4B-Experimental:Q5_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use faysalbenahmed/AMF-G1-4B-Experimental with Docker Model Runner:
docker model run hf.co/faysalbenahmed/AMF-G1-4B-Experimental:Q5_K_M
- Lemonade
How to use faysalbenahmed/AMF-G1-4B-Experimental with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull faysalbenahmed/AMF-G1-4B-Experimental:Q5_K_M
Run and chat with the model
lemonade run user.AMF-G1-4B-Experimental-Q5_K_M
List all available models
lemonade list
- Hermes Agent
How to use faysalbenahmed/AMF-G1-4B-Experimental with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf faysalbenahmed/AMF-G1-4B-Experimental:Q5_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 faysalbenahmed/AMF-G1-4B-Experimental:Q5_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use faysalbenahmed/AMF-G1-4B-Experimental with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf faysalbenahmed/AMF-G1-4B-Experimental:Q5_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 "faysalbenahmed/AMF-G1-4B-Experimental:Q5_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"
AMF G1 โ 4B Experimental
First learned neural artifact fabricated by AI Mission Foundry (AMF).
Created and developed by Fayรงal Benahmed
Stack Moderne โ France
G1 is not published as a qualified production model.
It is published as evidence of the AMF fabrication process that produced it.
Status
| Property | Status |
|---|---|
| Learned AMF artifact physically created | YES |
| Parent lineage sealed | YES |
| Canonical cold reload | PASS |
| Local BF16 execution | PASS |
| GGUF Q5_K_M derivation | PASS |
| Local Q5 execution | PASS |
| Local deployment behavior gate | PASS โ 15/15 |
| Local runtime viable | YES |
| Full AMF optimization / REPAIR loop used | NO |
| Model capability qualified | NO |
| System qualified | NO |
| Production recommended | NO |
What is G1?
G1 is the first learned neural model artifact produced during the early AMF model-fabrication experiments.
Its exact upstream substrate is:
Qwen/Qwen3-4B-Instruct-2507
revision: cdbee75f17c01a7cc42f958dc650907174af0554
AMF applied:
supervised LoRA training
rank = 16
learning rate = 4e-5
steps = 72
seed = 190901
followed by a safe merge
The result is a materialized derived neural checkpoint.
Important experimental limitation
G1 was produced before the intended AMF autonomous optimization and REPAIR loop was correctly implemented.
RC1 effectively executed:
MEASURE
-> IDENTIFY CAPABILITY GAP
-> FABRICATE G1
-> REMEASURE
-> FAIL
-> STOP
The intended Foundry loop is:
MEASURE
-> DIAGNOSE
-> FABRICATE / COMPOSE
-> REMEASURE
-> ANALYZE RESIDUAL FAILURE
-> CHOOSE REPAIR LOCUS
-> REPAIR
-> REMEASURE
-> repeat until PASS or justified refusal
Therefore G1 should be interpreted as:
the first fabricated candidate from an incomplete optimization loop,
not the final output of a completed AMF search.
Its measured failure is part of the research record.
Qualification result
The sealed G1 DEV measurement produced:
quality_state: FAIL_OBSERVED
qualified_output: 0.3472
latency_p95_s: 4.4042
Therefore:
MODEL_CAPABILITY_QUALIFIED = NO
AMF does not convert a failed qualification into a marketing PASS.
Known observed limitation
An original smoke test produced an exact-surface fidelity error:
evidence: Sarah Klein
output: sarah klien
This observation contributed to the later design of evidence-grounded diagnosis and REPAIR.
Local deployment derivative
The canonical BF16 model was transported to a consumer laptop and executed locally under CPU-only inference.
A GGUF Q5_K_M derivative was then created.
Measured Q5 deployment:
parameters: 4.02B
model size: 2.69 GiB
CPU: AMD Ryzen 5 8540U
threads: 6
prompt throughput: 11.73 +/- 0.35 tokens/s
generation throughput: 5.68 +/- 1.17 tokens/s
peak RSS: approximately 3.04 GiB
swap: 0
Local execution:
G1_Q5_LOCAL_EXECUTION = PASS
Local behavior gate
A separate deployment-oriented micro-evaluation tested:
SUPPORTED_FACTS
MISSING_EVIDENCE
CONTRADICTION
STRICT_SCHEMA
EXACT_EVIDENCE_FIDELITY
Each probe was repeated three times.
Result:
exact passes: 15 / 15
exact pass rate: 1.000
exact evidence fidelity: PASS
local behavior gate: PASS
This local gate is not the sealed AMF DEV/ROB/OOD qualification suite and does not change G1's qualification status.
The local gate also used a newly defined protocol rather than an exact replay of the historical A100 smoke prompts.
Artifact identity
Canonical G1 transport archive SHA256:
413ef141957d3dc4e3ec431a02bc37f4e02b0649c8d0cb61883de385ab86cb76
Internal G1 artifact SHA256:
9ee32a40e2aec3fe329fcef7f4c7fbe11444781c28fa14660d735df5ef7cebfa
GGUF Q5_K_M SHA256:
9cb29f9b6c1fffc6d8bf749c15f25b050c2c85569f5abfc7a888e099ea5e56a2
Training dataset receipt SHA256:
666462534451178582d29eb2214697bc9dbc1598bcf27b843b438f64ee2f0182
The immutable RC1 dataset receipt records:
split = train
final_access = NONE
This receipt establishes the identity of the historical training dataset. The
historical receipt records final_access = NONE, consistent with the campaign
rule that final data does not participate in search, training or fabrication. It does not, by itself,
establish the dataset's origin, authorship, license, collection method, consent
status, personal-data status, or suitability for a particular legal or
production context.
No additional provenance or compliance claim is made by this release. See
DATA_PROVENANCE_NOTICE.md for the complete public
claim boundary and the versioned remediation path.
Why publish G1?
G1 is not presented as a state-of-the-art model.
It records a concrete transition in AMF research:
existing intelligence
-> capability measurement
-> identified gap
-> learned fabrication
-> materialized model
-> measured failure
-> local deployment transformation
-> evidence for future REPAIR
Its failure is deliberately preserved.
AMF Agent is a separate public artifact demonstrating a system that passed its defined qualification gates.
G1 demonstrates that AMF can also fabricate learned neural material.
AMF
AI Mission Foundry
Mission + Constraints
|
v
AMF
|
v
Qualified Intelligence Realization
or qualified refusal
AMF treats models as raw material, capabilities as qualified components, and systems as architectures engineered for a mission.
Attribution
AMF โ AI Mission Foundry
Created and developed by Fayรงal Benahmed
Stack Moderne โ France
Independent research and engineering project
https://stack-moderne.fr/
License
G1 is derived from Qwen/Qwen3-4B-Instruct-2507,
which is distributed under the Apache License 2.0.
Third-party software and components remain governed by their respective licenses.
- Downloads last month
- 218