Downloads · 30 days
5
4% of all-time downloads
awhecmu/canonical-drafter-premise-round0-qwen06b
canonical-drafter-premise-round0-qwen06b is a machine learning model from awhecmu. 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 sentence-transformers. The card lists the license as apache-2.0.
Incumbent premise retriever for the CanonicalDrafter expert-iteration pipeline. Fine-tuned Qwen/Qwen3-Embedding-0.6B (SentenceTransformer) that, given a Lean 4 proof goal, retrieves useful Mathlib library theorems/def…
Downloads · 30 days
5
4% of all-time downloads
All-time downloads
140
Public
Repo size
3.1 GB
Likes
0
Public
Click a slice to open those files.
.gguf1.2 GB · 39%
From the Hugging Face model README
Incumbent premise retriever for the CanonicalDrafter expert-iteration pipeline.
Fine-tuned Qwen/Qwen3-Embedding-0.6B (SentenceTransformer) that, given a Lean 4
proof goal, retrieves useful Mathlib library theorems/definitions.
This repo bundles everything needed to serve the retriever in rollouts on a fresh machine — no GPU re-embedding required.
model/ — the SentenceTransformer model (load directly). ~1.2 GB.corpus/corpus_canonical_v4.30.0.tar.zst — precomputed corpus for this
model: the premise-round0-qwen06b.npy embeddings matrix (362602, 1024)
f32 L2-normalized, plus the Declarations/ decl bodies, Modules.jsonl,
HammerBlacklist.jsonl, revision. ~1.3 GB compressed. The FAISS app asserts
#embedding rows == #corpus decls at startup, so the npy and Declarations here
are aligned by construction.huggingface-cli download awhecmu/canonical-drafter-premise-round0-qwen06b \
--local-dir ./premise-round0-qwen06b
cd premise-round0-qwen06b
mkdir -p corpus/canonical_v4.30.0
tar -C corpus/canonical_v4.30.0 --zstd -xf corpus/corpus_canonical_v4.30.0.tar.zst
Then point the serving env at these paths:
.../premise-round0-qwen06b/model.../premise-round0-qwen06b/corpus/canonical_v4.30.0
(LOCAL_CORPUS_DIR / QWEN_CORPUS_DIR).../corpus/canonical_v4.30.0/embeddings/premise-round0-qwen06b.npy
(LOCAL_EMBEDDINGS_PATH)Instruct: Given a Lean 4 proof goal, retrieve library theorems and definitions useful for proving it\nQuery: (trailing space, goal appended). This exact
string is in model/instruction.model/config_sentence_transformers.json — it ships the
stock upstream prompt ("Given a web search query..."). Apply the instruction
above explicitly (the serving path sets QUERY_PROMPT); never rely on the
model's stored prompt.1_Pooling lasttoken, 2_Normalize);
FAISS IndexFlatIP = cosine.SentenceTransformer.encode(normalize_embeddings=True) everywhere (serve
Pp.applyOptions (CanonicalDrafter Core.lean), NOT
the legacy (pp.notation false, pp.fullNames true) mode — keep
PREMISE_LEGACY_PP unset for this Qwen model.