dinghy-law-0.6b-v1 — OpenVINO IR FP16
OpenVINO IR (FP16 transformer weights) export of Hanno-Labs/dinghy-law-0.6b-v1, a 0.6B legal-domain embedding model: 1024-dimensional embeddings, 8192 max sequence length, Apache-2.0.
The export is lossless against the PyTorch FP32 reference on a synthetic smoke fixture and ships at half the weight footprint.
Validation (vs PyTorch FP32 reference)
Fixture: 4 queries / 14 passages synthetic smoke test. Not a benchmark, not a legal-quality evaluation.
| Check | Result |
|---|---|
| Query cosine — min / mean / p05 | 1.0000000 / 1.0000000 / 1.0000000 |
| Query max absolute error | 6.45e-06 |
| Document cosine — min / mean / p05 | 0.99999958 / 1.0000000 / 0.99999982 |
| Document max absolute error | 1.02e-04 |
| Recall@1, Recall@5, MRR | identical to PyTorch FP32 |
| Top-1 agreement / Jaccard@5 | 1.000 / 1.000 |
| MRR drop | 0.0 |
| Tokenizer and prompt parity | PASS |
Raw report: openvino_fp16_validation.json.
Size and speed
| Artifact | Size |
|---|---|
openvino/openvino_model.bin (FP16 weights) |
1136.35 MB |
openvino/openvino_model.xml (graph) |
2.06 MB |
| FP32 reference weights (for comparison) | ~2273 MB |
Measured on an AMD Ryzen 7 5700U (8 threads, AVX2, no AVX-512, no VNNI), 4 queries + 15 passages per run, median of 2 runs after warm-up:
- PyTorch FP32: 1.1946 rows/s
- OpenVINO FP16: 1.1992 rows/s
- Ratio: 1.004×
FP16 does not deliver a throughput gain on the OpenVINO CPU plugin. The plugin converts FP16 constants to FP32 internally before computation, so accuracy is preserved but arithmetic throughput is unchanged. The wins from this artifact are:
- Half the weight footprint (~1136 MB vs ~2273 MB)
- Lossless accuracy (no quantization gap to validate)
- A self-contained OpenVINO IR with all Sentence-Transformers metadata
If you need latency, benchmark OpenVINO FP32 against ONNX Runtime FP32 on your hardware. The runtime choice is where the speedup lives, not the precision.
Usage
from sentence_transformers import SentenceTransformer
model = SentenceTransformer(
"Athithya117/dinghy-law-0.6b-v1-openvino-fp16",
backend="openvino",
model_kwargs={
"ov_config": {
"PERFORMANCE_HINT": "LATENCY",
"INFERENCE_NUM_THREADS": "8",
}
},
)
queries = model.encode_query([
"When does the limitation period for a personal injury claim begin?"
])
documents = model.encode_document([
"Under the discovery rule, accrual may be postponed until the plaintiff "
"discovers, or reasonably should discover, the injury."
])
Requires sentence-transformers>=6.0. The export uses the unified tokenizer.json fast tokenizer; older versions that expect separate vocab.txt / merges.txt files will not load this repository.
Load through SentenceTransformer(..., backend="openvino"), not through raw openvino.Core().read_model(). The IR returns last_hidden_state only. Pooling, the Dense projection, and L2 normalization are applied by the Sentence-Transformers pipeline in FP32 after the encoder.
Prompt format
The model expects a query prefix and no prefix on documents:
- Query:
Instruct: Given a web search query, retrieve relevant passages that answer the query\nQuery: <query text> - Document: raw passage text, no prefix
sentence-transformers applies the prefix automatically when you call encode_query() and skips it when you call encode_document(). Do not pre-pend the instruction manually if you use those methods.
IR scope
The FP16 IR contains only the transformer encoder. The following modules remain in the Sentence-Transformers pipeline and are stored in FP32:
1_Pooling— last-token pooling2_Dense— projection to 1024 dimensions3_Normalize— L2 normalization
This separation is intentional: it lets you swap the pooling strategy or add a Matryoshka-style projection without re-exporting the encoder, and it lets reviewers inspect the IR with openvino.Core().read_model() and see exactly what is (and is not) inside it.
Provenance
| Field | Value |
|---|---|
| Base model | Hanno-Labs/dinghy-law-0.6b-v1 |
| Resolved revision | 080ba18e73c85ce8a513241b011b867174883175 |
| Weight precision | FP16 (transformer constants: 99.999976% f16) |
| Quantization | none |
| Embedding dimension | 1024 |
| Max sequence length | 8192 |
| Tokenizer SHA-256 | fd7542d0b64e118db91bed0c4db9dbea440071a5056fe9ee8870b8350065ec93 |
| XML SHA-256 | 3398a4ca7c562afe7efe74b7514839c92ae4c5c4efb067cb3919b9ee2eef1c33 |
| BIN SHA-256 | 9e66e5c37291f7e38c3689fa9ffd9d7755016f5f1594c00c2d0655d9c2fc4771 |
Environment used for validation: Python 3.14.4, PyTorch 2.15.0+cpu, Sentence-Transformers 6.2.0, Transformers 5.5.4, OpenVINO 2026.4.1, Optimum Intel 2.2.0, Linux x86_64, AMD Ryzen 7 5700U.
Machine-readable manifest: openvino_fp16_manifest.json.
Files
| File | Purpose |
|---|---|
openvino/openvino_model.xml |
OpenVINO IR topology |
openvino/openvino_model.bin |
OpenVINO IR FP16 weights |
1_Pooling/config.json |
Pooling configuration (last-token) |
2_Dense/config.json, model.safetensors |
Projection to 1024 dimensions |
3_Normalize/config.json |
L2 normalization flag |
modules.json, config_sentence_transformers.json, sentence_bert_config.json |
Sentence-Transformers pipeline definition |
config.json |
Backbone configuration |
tokenizer.json, tokenizer_config.json |
Tokenizer |
openvino_fp16_manifest.json |
Export provenance |
openvino_fp16_validation.json |
Full validation report |
License
Apache-2.0, inherited from the base model.