Instructions to use flowxai/semantic-mapper with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use flowxai/semantic-mapper with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="flowxai/semantic-mapper") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("flowxai/semantic-mapper") model = AutoModelForCausalLM.from_pretrained("flowxai/semantic-mapper", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - MLX
How to use flowxai/semantic-mapper with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("flowxai/semantic-mapper") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use flowxai/semantic-mapper 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 flowxai/semantic-mapper:Q4_K_M # Run inference directly in the terminal: llama cli -hf flowxai/semantic-mapper:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf flowxai/semantic-mapper:Q4_K_M # Run inference directly in the terminal: llama cli -hf flowxai/semantic-mapper: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 flowxai/semantic-mapper:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf flowxai/semantic-mapper: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 flowxai/semantic-mapper:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf flowxai/semantic-mapper:Q4_K_M
Use Docker
docker model run hf.co/flowxai/semantic-mapper:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use flowxai/semantic-mapper with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "flowxai/semantic-mapper" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "flowxai/semantic-mapper", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/flowxai/semantic-mapper:Q4_K_M
- SGLang
How to use flowxai/semantic-mapper 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 "flowxai/semantic-mapper" \ --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": "flowxai/semantic-mapper", "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 "flowxai/semantic-mapper" \ --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": "flowxai/semantic-mapper", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use flowxai/semantic-mapper with Ollama:
ollama run hf.co/flowxai/semantic-mapper:Q4_K_M
- Unsloth Studio
How to use flowxai/semantic-mapper with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for flowxai/semantic-mapper to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for flowxai/semantic-mapper to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for flowxai/semantic-mapper to start chatting
- Pi
How to use flowxai/semantic-mapper with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "flowxai/semantic-mapper"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "flowxai/semantic-mapper" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use flowxai/semantic-mapper with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "flowxai/semantic-mapper"
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 flowxai/semantic-mapper
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use flowxai/semantic-mapper with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "flowxai/semantic-mapper"
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 "flowxai/semantic-mapper" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- MLX LM
How to use flowxai/semantic-mapper with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "flowxai/semantic-mapper"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "flowxai/semantic-mapper" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "flowxai/semantic-mapper", "messages": [ {"role": "user", "content": "Hello"} ] }' - Docker Model Runner
How to use flowxai/semantic-mapper with Docker Model Runner:
docker model run hf.co/flowxai/semantic-mapper:Q4_K_M
- Lemonade
How to use flowxai/semantic-mapper with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull flowxai/semantic-mapper:Q4_K_M
Run and chat with the model
lemonade run user.semantic-mapper-Q4_K_M
List all available models
lemonade list
Inference contract: FlowX Semantic Mapper
Prompt version: mapper_sys_v1.
This model was trained against a frozen inference contract: an exact system prompt, an exact user-turn format, a fixed decode setting, and a fixed output schema. Reproduce all four or the outputs drift. Do not edit the prompt or schema; the weights are trained against them.
Files in this directory:
prompt_mapper_sys_v1.txt: the system prompt, verbatim.schema_mapper_v1.json: JSON Schema for the output object (structural / semantic / governance).
Referenced from the repo root:
concept_taxonomy.yaml: the 252-concept controlled vocabulary theconceptsfield is drawn from.
1. System prompt (verbatim)
The exact contents of prompt_mapper_sys_v1.txt:
You are a legal and regulatory ontology extractor.
Extract structured tags from document chunks. Output ONLY valid JSON.
Send it as the system turn. No trailing whitespace, no extra lines.
2. User turn format
One regulatory/legal text chunk per request, wrapped exactly like this:
Extract ontology from this chunk:
CHUNK:
<the regulatory text>
- The literal header
Extract ontology from this chunk:, a blank line, thenCHUNK:, a newline, then the raw chunk text. - One chunk per call. The model was trained on single-chunk turns; do not batch multiple clauses into one user turn.
- Pass the chunk verbatim (the source language is fine: EN, FR, DE, RO). Do not pre-summarize or translate it.
3. Decode settings
| Setting | Value | Why |
|---|---|---|
enable_thinking |
False |
Qwen3 is a thinking model, but the adapter was trained on pure JSON with no reasoning block. Leaving thinking on yields an empty or malformed object. |
temperature |
0 (greedy) |
The task is deterministic extraction; sampling only adds drift. |
max_new_tokens |
~1024 | A full three-facet object fits comfortably; 1024 leaves headroom for long hierarchies. |
| stop | end-of-turn | The model emits a single JSON object and stops. |
Apply the chat template with add_generation_prompt=True, enable_thinking=False.
4. Output
A single JSON object with three top-level facets (structural, semantic,
governance), conforming to schema_mapper_v1.json.
Parse it strictly. On held-out data JSON validity is 1.00 and all three facets are
present 1.00, so a parse failure means the contract above was not reproduced (most
often enable_thinking left at its default).
5. The controlled concept vocabulary (required for semantic.concepts)
semantic.concepts is not free text. It is drawn from a 252-concept
controlled taxonomy shipped as concept_taxonomy.yaml at the repo root (6
categories: money, rights_waived, time_renewal, lease, insurance, data; each entry
has an id, a definition, and a primary_domain).
This is the model's central design choice. Open free-text concepts (1062 unique in
the first corpus, 88% of them singletons) were unlearnable and unmeasurable;
collapsing to 252 canonical ids made the concepts facet both learnable and
scoreable (F1 0.24 → 0.54). At integration time you should:
- Treat any concept id not present in
concept_taxonomy.yamlas out-of-vocabulary and drop or flag it. The model targets the controlled set but can still surface an occasional near-miss id. - Use the taxonomy
idas the join key into your policy layer.
domain_tags, by contrast, are a free snake_case vocabulary and are expected
to be noisier / less consistent than concepts.
6. Downstream
The governance.escalation_trigger (if <condition> THEN escalate) and
policy_references (PDP.<domain>.<rule>) are consumed by the sibling
flowxai/sentinel-gate
escalation model: Mapper tags a chunk → policy layer → Sentinel decides
DECIDE vs ESCALATE. Keep the field names stable so the pipeline lines up.