Text Generation
Transformers
Safetensors
GGUF
English
qwen3_5_text
MIND-Mem
memory
governance
retrieval-augmented
full-fine-tune
qwen3.5
conversational
tool-use
instruction-tuned
cognitive-kernel
knowledge-graph
v4
Instructions to use star-ga/mind-mem-4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use star-ga/mind-mem-4b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="star-ga/mind-mem-4b") 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("star-ga/mind-mem-4b") model = AutoModelForCausalLM.from_pretrained("star-ga/mind-mem-4b", 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 star-ga/mind-mem-4b 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 star-ga/mind-mem-4b:Q4_K_M # Run inference directly in the terminal: llama cli -hf star-ga/mind-mem-4b:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf star-ga/mind-mem-4b:Q4_K_M # Run inference directly in the terminal: llama cli -hf star-ga/mind-mem-4b: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 star-ga/mind-mem-4b:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf star-ga/mind-mem-4b: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 star-ga/mind-mem-4b:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf star-ga/mind-mem-4b:Q4_K_M
Use Docker
docker model run hf.co/star-ga/mind-mem-4b:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use star-ga/mind-mem-4b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "star-ga/mind-mem-4b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "star-ga/mind-mem-4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/star-ga/mind-mem-4b:Q4_K_M
- SGLang
How to use star-ga/mind-mem-4b 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 "star-ga/mind-mem-4b" \ --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": "star-ga/mind-mem-4b", "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 "star-ga/mind-mem-4b" \ --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": "star-ga/mind-mem-4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use star-ga/mind-mem-4b with Ollama:
ollama run hf.co/star-ga/mind-mem-4b:Q4_K_M
- Unsloth Desktop
- Pi
How to use star-ga/mind-mem-4b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf star-ga/mind-mem-4b: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": "star-ga/mind-mem-4b:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use star-ga/mind-mem-4b with Docker Model Runner:
docker model run hf.co/star-ga/mind-mem-4b:Q4_K_M
- Lemonade
How to use star-ga/mind-mem-4b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull star-ga/mind-mem-4b:Q4_K_M
Run and chat with the model
lemonade run user.mind-mem-4b-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use star-ga/mind-mem-4b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf star-ga/mind-mem-4b: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 star-ga/mind-mem-4b:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use star-ga/mind-mem-4b with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf star-ga/mind-mem-4b: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 "star-ga/mind-mem-4b: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"
docs: card fixes — full-FT (was QLoRA), library_name=transformers, drop qlora tag
Browse files
README.md
CHANGED
|
@@ -2,13 +2,13 @@
|
|
| 2 |
language:
|
| 3 |
- en
|
| 4 |
license: apache-2.0
|
| 5 |
-
library_name:
|
| 6 |
tags:
|
| 7 |
- mind-mem
|
| 8 |
- memory
|
| 9 |
- governance
|
| 10 |
- retrieval-augmented
|
| 11 |
-
-
|
| 12 |
- qwen3.5
|
| 13 |
- text-generation
|
| 14 |
- conversational
|
|
@@ -20,7 +20,7 @@ pipeline_tag: text-generation
|
|
| 20 |
|
| 21 |
A governance-aware memory-assistant model for [mind-mem](https://github.com/star-ga/mind-mem) — an auditable, contradiction-safe memory layer for coding agents (MCP-compatible).
|
| 22 |
|
| 23 |
-
This checkpoint is a **
|
| 24 |
|
| 25 |
## What's new in v3.9 vs. v3.0
|
| 26 |
|
|
@@ -49,18 +49,15 @@ The v3.0 fine-tune did not know about any of these surfaces; this revision resto
|
|
| 49 |
|
| 50 |
## Usage
|
| 51 |
|
| 52 |
-
### Load the
|
| 53 |
|
| 54 |
```python
|
| 55 |
-
from peft import PeftModel
|
| 56 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 57 |
|
| 58 |
-
|
| 59 |
-
ADAPTER = "star-ga/mind-mem-4b"
|
| 60 |
|
| 61 |
-
tokenizer = AutoTokenizer.from_pretrained(
|
| 62 |
-
|
| 63 |
-
model = PeftModel.from_pretrained(base, ADAPTER)
|
| 64 |
|
| 65 |
messages = [
|
| 66 |
{"role": "system", "content": "You are mind-mem-4b, a memory-governance assistant."},
|
|
@@ -83,10 +80,13 @@ llama-cli -m ./gguf/mind-mem-4b-Q4_K_M.gguf -p "Show me a TransformHash block te
|
|
| 83 |
|
| 84 |
### Pin a prior revision
|
| 85 |
|
| 86 |
-
The v3.0 fine-tune is preserved as a HF revision tag:
|
| 87 |
|
| 88 |
```python
|
| 89 |
-
|
|
|
|
|
|
|
|
|
|
| 90 |
```
|
| 91 |
|
| 92 |
## Training recipe
|
|
|
|
| 2 |
language:
|
| 3 |
- en
|
| 4 |
license: apache-2.0
|
| 5 |
+
library_name: transformers
|
| 6 |
tags:
|
| 7 |
- mind-mem
|
| 8 |
- memory
|
| 9 |
- governance
|
| 10 |
- retrieval-augmented
|
| 11 |
+
- full-fine-tune
|
| 12 |
- qwen3.5
|
| 13 |
- text-generation
|
| 14 |
- conversational
|
|
|
|
| 20 |
|
| 21 |
A governance-aware memory-assistant model for [mind-mem](https://github.com/star-ga/mind-mem) — an auditable, contradiction-safe memory layer for coding agents (MCP-compatible).
|
| 22 |
|
| 23 |
+
This checkpoint is a **full fine-tune** of `Qwen/Qwen3.5-4B` (every one of the ~4 B parameters trained), trained on the mind-mem v3.9.0 source tree: all **81 MCP tool signatures** (24 new in the v3.4 → v3.9 surface — incl. `compile_truth_walkthrough`, `recall_with_persona`, `pipeline_status`, `reindex_dirty`, MIC/MAP wire format, governance hooks, kernels), block-type schemas (with the new `TransformHash` field, v3.9), full CHANGELOG history through v3.9.0, the docs/ tree, and curated end-to-end governance workflow transcripts.
|
| 24 |
|
| 25 |
## What's new in v3.9 vs. v3.0
|
| 26 |
|
|
|
|
| 49 |
|
| 50 |
## Usage
|
| 51 |
|
| 52 |
+
### Load the model (bf16 full fine-tune)
|
| 53 |
|
| 54 |
```python
|
|
|
|
| 55 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 56 |
|
| 57 |
+
REPO = "star-ga/mind-mem-4b"
|
|
|
|
| 58 |
|
| 59 |
+
tokenizer = AutoTokenizer.from_pretrained(REPO)
|
| 60 |
+
model = AutoModelForCausalLM.from_pretrained(REPO, dtype="bfloat16", device_map="auto")
|
|
|
|
| 61 |
|
| 62 |
messages = [
|
| 63 |
{"role": "system", "content": "You are mind-mem-4b, a memory-governance assistant."},
|
|
|
|
| 80 |
|
| 81 |
### Pin a prior revision
|
| 82 |
|
| 83 |
+
The v3.0 QLoRA fine-tune is preserved as a HF revision tag:
|
| 84 |
|
| 85 |
```python
|
| 86 |
+
from peft import PeftModel
|
| 87 |
+
from transformers import AutoModelForCausalLM
|
| 88 |
+
base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.5-4B", dtype="bfloat16", device_map="auto")
|
| 89 |
+
model = PeftModel.from_pretrained(base, "star-ga/mind-mem-4b", revision="v3.0.0")
|
| 90 |
```
|
| 91 |
|
| 92 |
## Training recipe
|