GGUF conversions of Microsoft's harrier-oss-v1-270m for llama.cpp: a 270M-parameter decoder of the Gemma 3 architecture that turns text into 640-dimensional vectors, with last-token pooling. Nothing is changed but the file format; for what the model does and how well, see Microsoft's model card.
Harrier declares the architecture Gemma3TextModel, which llama.cpp's own
converter takes for EmbeddingGemma (gemma-embedding): bidirectional
attention with sliding windows. Harrier was trained as a causal decoder with
full attention in every layer (use_bidirectional_attention: false, every
entry of layer_types is full_attention). These files are converted as
plain Gemma 3 (gemma3): causal attention, no sliding window, last-token
pooling, and they give Microsoft's vectors (see the check below).
| File | Weights | Size | SHA-256 |
|---|---|---|---|
harrier-oss-v1-270m-f16.gguf |
float16 | 551 MB | 43d0b62ba864cf717e4cff0bfb1e193c3276dba084ed9f5182d8205d3101028a |
harrier-oss-v1-270m-q8_0.gguf |
8-bit (Q8_0) |
300 MB | 8f568596ed2ca5a089fad916fc6c331c81df6b1a685319d2fb46dd693249fb8a |
Source: microsoft/harrier-oss-v1-270m, revision
31de22b673913c7d658c0f03f792d77c2dcf8ebd (30 March 2026),
model.safetensors and its configuration, fetched with huggingface_hub.
Converter: llama.cpp convert_hf_to_gguf.py at commit
d81235049384534c167caea52b85a694f6103d14
(5 October 2026), the llama.cpp version of the Rust crate llama-cpp-2
0.1.160, run with three changes and nothing else:
Gemma3TextModel is converted by the converter's Gemma3Model class
(architecture gemma3), not by its EmbeddingGemma class. The config's
sliding_window_pattern is 1, so no sliding window is written.gemma4. Harrier's vocabulary, merges, normaliser
and pre-tokenizer are those of IBM's
granite-embedding-311m-multilingual-r2, which llama.cpp registers as
gemma4; the converter does not recognise harrier's hash only because
harrier's template appends <eos>.<image_soft_token> (id
262144), an added token of Gemma 3's image input that lies past the
model's 262144 embedding rows; text never produces it.The pooling type (last token) is read from the repository's 1_Pooling.
python convert_harrier.py f16 # --outtype f16, --model-name harrier-oss-v1-270m
python convert_harrier.py q8_0 # --outtype q8_0, --model-name harrier-oss-v1-270m
Each file was run by llama.cpp (through llama-cpp-2 0.1.160, on the CPU)
and compared with Microsoft's own model code in PyTorch (transformers
5.21.0, torch 2.14.1, float32, last-token pooling, L2 norm), on 181 texts
of up to 512 tokens: Wikipedia articles in Russian, German and English on the
same ten topics, and paragraphs that mix Russian and English.
| File | Lowest cosine to the reference | Mean |
|---|---|---|
| f16 | 0.999992 | 0.999996 |
| q8_0 | 0.99952 | 0.99971 |
The token ids came from the source repository's own tokenizer
(tokenizer.json); llama.cpp's built-in tokenizer was not compared.
The model needs last-token pooling, and the text must end with <eos>, as
the source tokenizer adds it. Normalise the vectors if you compare them by
cosine.
llama-embedding -m harrier-oss-v1-270m-f16.gguf \
--pooling last --embd-normalize 2 -p "Your text"
llama-server -m harrier-oss-v1-270m-f16.gguf \
--embedding --pooling last
A query needs a one-sentence instruction in front, a document does not, as Microsoft's card says; for example:
Instruct: Given a web search query, retrieve relevant passages that answer the query
Query: how much protein should a female eat
Speed. llama.cpp before 13 October 2026 computes the scores of the whole vocabulary for every token of a decoder even when only pooled vectors are asked for, which makes this model several times slower than it needs to be; fixed in ggml-org/llama.cpp#30445 and #30255. The vectors are the same either way.
The model weights are under the MIT license, as published by Microsoft. The tokenizer is the Gemma 3 tokenizer, and the network has the dimensions of Gemma 3 270M; Microsoft's card does not name a base model. Check the Gemma Terms of Use for your use.
microsoft/harrier-oss-v1-270m