Views
No views yet
llama-embed architecture. Specifically:LLM_TENSOR_CLS and LLM_TENSOR_CLS_OUT in the LLM_ARCH_LLAMA_EMBED tensor allowlistcausal_attn and pooling_type hparam reads in the LLM_ARCH_LLAMA_EMBED casepinned-for-rs) includes both patches.convert_hf_to_gguf.py conversion produced a GGUF that wouldn't load correctly for reranking. These post-conversion fixes were applied:cls.weight → cls.output.weight (maps to LLM_TENSOR_CLS_OUT prefix "cls.output")[2048] (1D) → {2048, 1} (2D classification head)llama-embed.classifier.output_labels: ["relevance"] (sets n_cls_out=1)tokenizer.ggml.add_eos_token: true (required for non-zero rerank scores)| File | Quant | Size |
|---|---|---|
| llama-nemotron-rerank-1b-v2.Q8_0.gguf | Q8_0 | ~1.25 GB |
| llama-nemotron-rerank-1b-v2.Q4_K_M.gguf | Q4_K_M | ~770 MB |
1# Using the patched memoryco/llama.cpp fork
2./build/bin/llama-embedding \
3 -m llama-nemotron-rerank-1b-v2.Q8_0.gguf \
4 --pooling rank \
5 -p 'passage: Paris is the capital of France. query: what is the capital of france'passage: {document_text}. query: {query_text} as a single string. The model outputs a single float score (higher = more relevant).