Downloads · 30 days
13
9% of all-time downloads
pei39/deepseek_r1_distill_qwen_7b_awq_rag
deepseek_r1_distill_qwen_7b_awq_rag is a machine learning model from pei39. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
This is a training-free IOL-AI submission using a 4-bit AWQ conversion of deepseek-ai/DeepSeek-R1-Distill-Qwen-7B. It retrieves only from the public, string-only extraction of Vlad A. Neacșu's Linguistics Olympiad: Tr…
Downloads · 30 days
13
9% of all-time downloads
All-time downloads
147
Public
Parameters
7.6B
5.6 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors5.6 GB · 100%
How the weights are stored.
I326.5B · 86%
From the Hugging Face model README
This is a training-free IOL-AI submission using a 4-bit AWQ conversion of
deepseek-ai/DeepSeek-R1-Distill-Qwen-7B. It retrieves only from the public,
string-only extraction of Vlad A. Neacșu's Linguistics Olympiad: Training
guide. Private curated training data are not present or required at runtime.
The checkpoint uses Qwen2ForCausalLM, so it is compatible with the challenge's
Transformers 4.44.1 and AutoAWQ 0.2.7 runtime. The included weights are from
casperhansen/deepseek-r1-distill-qwen-7b-awq, revision
305e6f12907dc78ae61a1f0bb7a19faa2b25e8a3, which is an AWQ conversion of the
official DeepSeek model.
python script.py
The script reads /tmp/data/test.csv and writes submission.csv. Its columns
are id,pred,explanation; pred is a JSON-encoded list of answer strings.
Explanation generation is disabled by default, leaving that optional column
blank. It can be restored with:
python script.py --explanations on
For local data:
python script.py --input path/to/test.csv --output submission.csv
python script.py --self-test
After the model loads successfully, the output file is initialized and then atomically rewritten after every completed row. If evaluation reaches its time limit, predictions already completed remain in a valid submission file.
DeepSeek's solver instructions, retrieved context, and current problem are
placed in one user message rather than a separate system message. The assistant
prompt is prefixed with <think> to engage the distilled reasoning behavior.
Reasoning stops when </think> appears or at its configured cap. The runtime
then starts a separate FINAL ANSWERS: stage, guaranteeing that reasoning
cannot consume the answer budget. Only that answer block is serialized into
pred.
Defaults follow DeepSeek's recommended sampling values while retaining a bounded challenge-time output:
temperature=0.6top_p=0.95max_reasoning_tokens=4096max_answer_tokens=1024answer_retry_tokens=512The model context is capped at 32,768 tokens. The script loads AWQ directly in
FP16, enables the KV cache, and applies an inference-only last-token lm_head
hook to avoid materializing full-prompt FP32 vocabulary logits on the T4.
The default prompt includes one general book method and two worked book
examples. Retrieval combines dependency-free BM25, character 3–5-gram TF-IDF,
task-family inference, and book metadata boosts. It uses only the current
problem's context + query; answers and private curated datasets are never
indexed.
Settings are in rag_resources/config.json. Environment overrides are available
for IOL_TOP_METHODS, IOL_TOP_EXAMPLES, IOL_CHAR_TFIDF_WEIGHT,
IOL_RAG_MAX_CHARS, IOL_MAX_REASONING_TOKENS,
IOL_MAX_ANSWER_TOKENS, IOL_ANSWER_RETRY_TOKENS,
IOL_EXPLANATION_MAX_NEW_TOKENS,
IOL_ENABLE_EXPLANATIONS, and IOL_SEED.
The model and conversion are marked MIT. The book-derived resources retain
their own license and attribution in rag_resources/ATTRIBUTION.md.