curru-embed-4b: ATT&CK query embedder (Qwen3-Embedding-4B, LoRA)

Files

File Size What it is
q4b-Q8_0.gguf 4.3 GB Recommended. 8-bit quantization; same retrieval as full precision on 240 test queries
q4b-Q4_K_M.gguf 2.5 GB 4-bit quantization; smaller, slightly worse (see the table below)
adapter/ 0.5 GB the LoRA adapter alone (rank 64), to rebuild the merged model or another quantization from the public base model
SHA256SUMS checksums of the GGUF files and the adapter
LICENSE, NOTICE Apache-2.0 text and the attribution and change notice it requires

SHA-256: q4b-Q8_0.gguf = b6282d09fce135a654d675da55dbd2db597afef96704a172cc1e769303bee7ef, q4b-Q4_K_M.gguf = 01e26fa9559da66701c05903d12126f67db4ab938c7601cdc43be8e48d23dc8d.

Use it

llama-server -m q4b-Q8_0.gguf --embedding --pooling last --port 8097 -c 1024
# then point Curru's [embedding].url at http://127.0.0.1:8097  (https://github.com/Maracuya4263/curru)

Always prefix queries with the instruction shown above; without it the vectors do not match the ATT&CK vectors shipped with Curru.

Model details

  • What it is: Qwen/Qwen3-Embedding-4B fine-tuned with LoRA (rank 64, ~132 M trainable parameters) so that a short description of behavior (an alert title, an analyst's sentence, a sentence from a threat report) lands near the MITRE ATT&CK technique it describes. The adapter is merged into the weights.
  • Only the query side is fine-tuned. The 706 technique documents are embedded with the base 4B model, from an "enriched" text per technique: name, description, tactics, platforms, up to 5 procedure examples and one detection analytic. Queries must carry the instruction prefix below.
  • Training run: 1 epoch, 819 steps, one A100, ~24 minutes, final training loss 0.835.
  • Base model license: Apache-2.0 according to the base model's card; check it again before redistributing. These fine-tuned weights are released under Apache-2.0, the same license as the base model (see LICENSE and NOTICE). The Curru code is a separate project under AGPL-3.0-or-later.
  • Distributed as: merged safetensors (8.0 GB) and GGUF quantizations: Q8_0 (4.3 GB, recommended) and Q4_K_M (2.5 GB).

Query format (exact):

Instruct: Given a security alert or detection rule title, retrieve the MITRE ATT&CK technique it matches
Query:<text>

Intended use

Ranking aid for SOC analysts: given a description, propose the most likely ATT&CK (Enterprise v20.1) techniques with reasons, to be reviewed by a person. Not an automatic classifier of incidents, not for attributing attacks to actors, and not a detector of anything: it embeds text.

Training data

26,187 examples; details and provenance caveats in DATASHEET.md: 4,094 English examples from the project's first training set, 2,344 operator-style queries written by an LLM, 17,108 procedure examples from ATT&CK v20.1 (public MITRE text; 111 removed for overlapping with the TRAM test set) and 2,641 sentences from the 74 development reports of TRAM.

Evaluation (top-k = the correct technique appears among the k best of 706)

Exam Nature top-1 top-10
Operator queries, Spanish, 120 synthetic (LLM-written) 55.8 % 92.5 % [86.4-96.0]
Alert titles, Spanish, 120 synthetic (LLM-written) 40.8 % 88.3 % [81.4-92.9]
Both Spanish sets together, 240 (full-precision reference) synthetic 48.3 % 90.4 %
TRAM test, 75 held-out reports human reports, same domain as part of the training 77.3 % [74.3-80.6] 97.1 % [95.6-98.5]
AnnoCTR, 3,219 sentences, 138 techniques independent, human-annotated, never trained on; the whole sentence is the query 18.9 % [16.5-21.3] 64.1 % [61.1-67.4]

Read these honestly:

  • The AnnoCTR figure is the one to trust for generalization, and it is modest. A diagnosis with the previous 4B model showed that much of the gap comes from how the query is built: each annotation marks a fragment, and a whole sentence usually carries several ideas (that model reached 82.3 % top-10 when the query was only the annotated fragment). Its convention also labels generic concepts (macros, JavaScript) with the parent technique T1059, which costs about 9-10 points of exactness.
  • The TRAM figure is inflated by shared domain: for 63.2 % of TRAM test sentences the nearest training example has the same label (median similarity 0.79). Do not quote 97 % as general accuracy.
  • The synthetic exams were generated by an LLM and their labels were not validated by experts. Two blind LLM judges found 7 of 120 operator labels and 14 of 120 alert labels unsupported, and a sample of 150 training queries had 4.0 % unsupported (Wilson 95 %: 1.8-8.5 %) and 18 % ambiguous labels.
  • Intervals are 95 % (bootstrap or Wilson, by document where the exam has documents).
  • Quantization (measured on the 240 Spanish queries, vectors compared with the full-precision model on GPU): Q8_0 gives the same top-1/3/10 (48.3 / 76.7 / 90.4 %) with vector similarity 0.9997; Q4_K_M gives 45.4 / 76.2 / 90.0 % with 0.981.

Limitations and risks

  • ATT&CK Enterprise v20.1 only; other versions need new document vectors.
  • Spanish is weaker than English in earlier pipelines; the synthetic Spanish exams are the only Spanish measurement and they share the generator's style.
  • Techniques about preparation outside the victim's network (Resource Development) are not observable by a SOC and were the main source of invented labels in the training data.
  • Granularity: telling a technique from its sub-technique is hard; expect to look at the top 3 to 10, not only the first.
  • Bias: the training distribution follows what ATT&CK documents (well-known malware and groups) and what an LLM finds easy to describe. Rare or novel behavior is under-served.
  • No personal data was intentionally included; the sources are public ATT&CK text, public threat-report sentences and generated text.
  • A wrong suggestion costs analyst time, and a confident wrong one could mislead a junior analyst: Curru shows relative confidence in words, never raw scores, and never names an actor without strong evidence. The model itself has no such guard.

How to reproduce the numbers

tools/eval_quant.py (quantization against reference vectors) and tools/parity_search.py (local model against the GPU service). The experiment log, training scripts and exams live in the AEGIS course repository this project grew out of; they are not duplicated here.

Downloads last month
-
GGUF
Model size
4B params
Architecture
qwen3
Hardware compatibility
Log In to add your hardware

4-bit

8-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for Maracuya4263/curru-embed-4b

Adapter
(42)
this model