How to use from
vLLM
Install from pip and serve model
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "CodeStrux-Tech/tac-1"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
	-H "Content-Type: application/json" \
	--data '{
		"model": "CodeStrux-Tech/tac-1",
		"messages": [
			{
				"role": "user",
				"content": "What is the capital of France?"
			}
		]
	}'
Use Docker
docker model run hf.co/CodeStrux-Tech/tac-1
Quick Links

tac-1 — Costa Rican reference-point address parser

What is tac-1

Costa Rica has no street-address system. Addresses are reference-point narratives — "del antiguo higuerón de San Pedro, 100 metros sur" or "de la esquina noroeste del Mercado Central, 200 metros norte, casa esquinera." tac-1 parses these into a structured, leg-based JSON record. It performs parsing only: geometry (resolving the anchor point to coordinates and walking the OSM street graph along each leg) belongs to the deterministic grounder in the tico-address repo (https://github.com/CodeStrux/tac-1).

Architecture

tac-1 is a hybrid system. This model extracts the structured address fields (anchor name, anchor type, and a list of legs with direction and distance). The tico package then grounds the parse by walking the OSM street graph — it resolves the anchor to a coordinate via resolve_anchor, then traces each leg along the graph using the same geometry core that generated the training data. See https://github.com/CodeStrux/tac-1 for the full grounder implementation.

Evaluation

gold-47 vs teacher

metric tac-1 (bf16) tac-1 (FP8) teacher gpt-4.1
parse rate 1.000 1.000 1.000
anchor_name F1 0.979 0.979 0.872
direction F1 0.995 0.984 1.000
distance F1 0.995 0.984 1.000
perfect-anchor ≤250 m 93.6% 93.6% 93.6%
perfect-anchor median 0.0 m 0.0 m 0.0 m
gazetteer ≤250 m 80.9% 80.9% 83.0%

Headline: anchor_name F1 beats the gpt-4.1 teacher, with zero geographic overfit on never-trained districts.

heldout-805

metric tac-1 (bf16)
parse rate 1.000
anchor_name F1 1.000
direction F1 1.000
distance F1 1.000
perfect-anchor median 89.5 m
perfect-anchor ≤250 m 81.0%
gazetteer median 148.8 m
gazetteer ≤250 m 65.0%

Grounding-baseline medians on heldout-805: hybrid_walk 143.8 m vs calibrated_project 198.7 m vs naive_project 201.9 m (the graph walk beats projection on unseen geography).

The three never-trained districts (grecia, curridabat, go-guadalupe) show anchor_name/direction/distance F1 all at 1.000 — zero geographic overfit.

Quickstart

vllm serve CodeStrux-Tech/tac-1 --served-model-name tac-1 --max-model-len 4096
# On hosts without nvcc, disable the FlashInfer sampler JIT:
#   VLLM_USE_FLASHINFER_SAMPLER=0 vllm serve ...
from tico.extractor.clients.vllm import VLLMExtractor

extractor = VLLMExtractor()  # VLLM_BASE_URL=http://localhost:8000/v1, TICO_VLLM_MODEL=tac-1
addr = extractor.extract("del antiguo higuerón de San Pedro, 100 metros sur")
print(addr.model_dump_json(indent=2))

Limitations

  • confidence is a constant 0.0 — uncalibrated; do not consume this value.
  • anchor lat/lon/osm_id are always null by design — coordinates belong to the grounder's resolve_anchor, not the model.
  • Spanish/Costa-Rica-specific — the model was trained and evaluated exclusively on Costa Rican Spanish reference-point addresses.
  • Remaining system headroom is gazetteer/calibration coverage, not the model — the extractor is at or near ceiling on the evaluation sets; further accuracy gains require broader OSM ingestion and calibration.

Training

  • Base model: Qwen/Qwen3-4B-Instruct-2507
  • Method: QLoRA (r=16, α=32)
  • Learning rate: 2e-4
  • Epochs: 2
  • Max sequence length: 4096
  • Steps: 692
  • Final train loss: 0.043
  • Hardware: ~2 h 50 m on an RTX 4080 16 GB
  • Stack: unsloth 2025.11.1 / transformers 4.57.2 / trl 0.23.0
  • Corpus: CodeStrux-Tech/tac-1-corpus — 5,532 train examples (seed 0), 805 heldout examples (seed 1); --max-legs 4; 22 districts ingested, 19,042 POIs, 11 griddable; holdout districts grecia, curridabat, go-guadalupe excluded from training.

Training data attribution

Contains information from OpenStreetMap (https://www.openstreetmap.org/copyright), which is made available under the Open Database License (ODbL) 1.0. © OpenStreetMap contributors.

Licensing. The tac-1 corpus is a derivative database of OpenStreetMap and is released under the Open Database License (ODbL) 1.0, with attribution: © OpenStreetMap contributors (https://www.openstreetmap.org/copyright). The tac-1 model weights are a produced work trained on that corpus and are released under Apache-2.0; the corpus's ODbL provenance is disclosed in every model card. Code is Apache-2.0 (LICENSE); data is ODbL (DATA_LICENSE); see NOTICE. Sources are OpenStreetMap + INEC/IGN + community DTA tables only — no Google or Waze data anywhere in the pipeline, training data, or release.

Related

tac-1 is a derivative work of Qwen/Qwen3-4B-Instruct-2507, Copyright 2024 Alibaba Cloud, licensed under the Apache License, Version 2.0. The upstream LICENSE is included in this repository.

Downloads last month
367
Safetensors
Model size
4B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for CodeStrux-Tech/tac-1

Finetuned
(1822)
this model
Quantizations
2 models