Downloads · 30 days
120
21% of all-time downloads
Hanno-Labs/dinghy-law-4b-v1-gguf
dinghy-law-4b-v1-gguf is a machine learning model from Hanno-Labs. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for gguf. The card lists the license as apache-2.0.
GGUF / llama.cpp build of Hanno-Labs/dinghy-law-4b-v1, a compact (0.6B) legal text-embedding model (contrastive fine-tune of Qwen/Qwen3-Embedding-0.6B). Source revision d1fa2f346ca7461f680036b8af1927706a3afb58.
Downloads · 30 days
120
21% of all-time downloads
All-time downloads
572
Public
Repo size
18.1 GB
Likes
0
Public
Click a slice to open those files.
.gguf18.1 GB · 100%
From the Hugging Face model README
GGUF / llama.cpp build of Hanno-Labs/dinghy-law-4b-v1, a compact (0.6B) legal text-embedding model
(contrastive fine-tune of Qwen/Qwen3-Embedding-0.6B). Source revision d1fa2f346ca7461f680036b8af1927706a3afb58.
The sentence-transformers pipeline is Transformer -> last-token Pooling -> Dense -> L2 Normalize. llama.cpp carries
the backbone: Transformer -> last-token pool -> L2 norm. The 2_Dense head is dropped — it is a
near-orthogonal rotation (normalized ortho-defect 0.00103, unit row-norms, ~zero bias), and cosine similarity is
invariant under rotation, so dropping it does not change retrieval ranking. Probe cosine(full, backbone) = 0.997 with
identical nearest-neighbor ordering.
dinghy-law-4b-v1-Q4_K_M.gguf — 2.50 GBdinghy-law-4b-v1-Q6_K.gguf — 3.31 GBdinghy-law-4b-v1-Q8_0.gguf — 4.28 GBdinghy-law-4b-v1-f16.gguf — 8.05 GB| file | mean cos | min cos |
|---|---|---|
dinghy-law-4b-v1-Q4_K_M.gguf | 0.97659 | 0.97009 |
dinghy-law-4b-v1-Q6_K.gguf | 0.99553 | 0.99459 |
dinghy-law-4b-v1-Q8_0.gguf | 0.99944 | 0.99931 |
dinghy-law-4b-v1-f16.gguf | 1.00000 | 1.00000 |
Worst min-cos across quants: 0.97009 (WARN).
Embeddings use last-token pooling and L2 normalization:
llama-embedding -m dinghy-law-4b-v1-Q8_0.gguf \
-p "Retrieve statutes governing landlord obligations for habitability." \
--pooling last --embd-normalize 2
For retrieval, format the query with the Qwen3-Embedding instruction prefix (documents are embedded raw):
Instruct: {task_instruction}\nQuery: {query}
e.g. task instruction Identify the most relevant statutes for the given situation. for statute retrieval.
Quantized from the source safetensors with llama.cpp/convert_hf_to_gguf.py (f16) + llama-quantize (Q8_0, Q4_K_M).
MTEB(Law, v1) Mean(Task) nDCG@10 of the full model = 71.24. License: apache-2.0.