Text Generation
Transformers
Safetensors
GGUF
MLX
qwen3
lora
regulatory
compliance
ontology-extraction
information-extraction
flowx
conversational
Eval Results (legacy)
text-generation-inference
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)# pip install -U transformers accelerate # 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=256) 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 Desktop
- 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 @earendil-works/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
- 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
- Hermes Agent
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
- OpenClaw
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"
Add EVAL_RESULTS.md
Browse files- EVAL_RESULTS.md +52 -0
EVAL_RESULTS.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# FlowX Semantic Mapper (4B) — Evaluation Results
|
| 2 |
+
|
| 3 |
+
Held-out evaluation of the released model (`flowx-semantic-mapper-4b-v2`). All numbers are on a
|
| 4 |
+
**document-disjoint held-out set of 112 records** spanning EN/FR/DE/RO across banking,
|
| 5 |
+
insurance, logistics, and labor. Decoding: greedy (temperature 0), `enable_thinking=False`.
|
| 6 |
+
Metrics are exact set-match precision/recall/F1 unless noted; `concepts` also reports a
|
| 7 |
+
fuzzy/semantic token-match F1, and `entities` reports field-accuracy over actor/action/object.
|
| 8 |
+
|
| 9 |
+
## Headline (held-out, n=112)
|
| 10 |
+
|
| 11 |
+
| Field | Precision | Recall | F1 |
|
| 12 |
+
| --- | --- | --- | --- |
|
| 13 |
+
| JSON validity | | | 1.00 |
|
| 14 |
+
| all-3-facets present | | | 1.00 |
|
| 15 |
+
| domain_tags (free-text) | 0.552 | 0.570 | 0.555 |
|
| 16 |
+
| concepts (controlled 252-vocab, exact) | 0.547 | 0.558 | 0.541 |
|
| 17 |
+
| concepts (fuzzy / semantic match) | 0.596 | 0.590 | 0.578 |
|
| 18 |
+
| entities (field-accuracy) | | | 0.530 |
|
| 19 |
+
|
| 20 |
+
## The controlled-vocabulary result (before / after)
|
| 21 |
+
|
| 22 |
+
The central design change of this release was replacing open free-text `concepts` (1062
|
| 23 |
+
unique labels, 88% seen exactly once, unlearnable and unmeasurable) with a **controlled
|
| 24 |
+
252-concept taxonomy** (`concept_taxonomy.yaml`), then expanding the corpus with real
|
| 25 |
+
regulatory text.
|
| 26 |
+
|
| 27 |
+
| Concepts F1 | value | held-out |
|
| 28 |
+
| --- | --- | --- |
|
| 29 |
+
| open free-text vocabulary (v1) | 0.24 (exact) / 0.37 (fuzzy) | n=35 |
|
| 30 |
+
| controlled vocab + data expansion (this release) | **0.54** (exact) / **0.58** (fuzzy) | n=112 |
|
| 31 |
+
|
| 32 |
+
Concepts F1 more than doubled, and `entities` went from **unmeasurable** (the facet was empty
|
| 33 |
+
in the old held-out) to **0.53**, on a held-out set that is 3x larger and multilingual.
|
| 34 |
+
|
| 35 |
+
## Honest reading / caveats
|
| 36 |
+
|
| 37 |
+
- **Home-field note.** The held-out shares the annotation lineage of the training data
|
| 38 |
+
(real regulatory text, frontier-model-assisted ontology annotation to the controlled vocab).
|
| 39 |
+
Read these as a strong format-and-consistency signal; validate on your own corpus before
|
| 40 |
+
production claims.
|
| 41 |
+
- **Concepts are partial (~0.54).** The model surfaces many but not all applicable concepts.
|
| 42 |
+
- **`domain_tags` are free-text on purpose** (recall + human browsing) and are honestly noisier
|
| 43 |
+
than the controlled `concepts`.
|
| 44 |
+
- **English is strongest;** FR/DE/RO are supported and materially improved by the real-data
|
| 45 |
+
expansion, but remain a bit weaker than EN.
|
| 46 |
+
|
| 47 |
+
## Reproduction
|
| 48 |
+
|
| 49 |
+
Held-out set: `mlx_data/ontology_cv2/valid.jsonl` (built document-disjoint from the training
|
| 50 |
+
split). Scorer: `eval_mapper_4b.py <model_path> mlx_data/ontology_cv2/valid.jsonl`.
|
| 51 |
+
|
| 52 |
+
_Author: Bogdan Răduță, Head of Research, FlowX.AI._
|