Views
No views yet
submission.csv.1<repository root>/
2├── script.py
3├── README.md
4├── config.json # AWQ model config (add with model snapshot)
5├── generation_config.json # add with model snapshot
6├── tokenizer files # add with model snapshot
7├── AWQ safetensor shards # add with model snapshot
8└── rag_resources/
9 ├── config.json
10 ├── system_prompt.txt
11 ├── retriever.py
12 ├── book_methods.jsonl
13 ├── book_examples.jsonl
14 └── ATTRIBUTION.mdQwen/Qwen2.5-14B-Instruct-AWQ snapshot in this directory. From the parent directory:1huggingface-cli download Qwen/Qwen2.5-14B-Instruct-AWQ \
2 --local-dir qwen2_5_14b_awq_rag_submission \
3 --exclude README.md .gitattributeslocal_files_only=True.python script.py/tmp/data/test.csv and writes submission.csv in the current directory. The output has exactly the columns id,pred,explanation. id is copied unchanged and pred is a JSON-encoded list of answer strings. Explanation generation is off by default to save inference time, so explanation is blank unless it is enabled. The accepted raw reasoning is used internally but is never written to the CSV.1python script.py --explanations on
2python script.py --explanations offsubmission.csv.python script.py --input path/to/test.csv --output submission.csvpython script.py --self-testqwen2 Transformers architecture and requires Transformers 4.37 or newer, so version 4.44.1 is compatible. The script verifies that the shipped model config declares both model_type=qwen2 and quant_method=awq.AutoModelForCausalLM.from_pretrained(...) and FP16 computation. Do not add a BitsAndBytesConfig to this AWQ model: that would attempt to combine two quantization routes. Bitsandbytes remains a valid alternative only when shipping the unquantized Qwen checkpoint and quantizing it during loading; that alternative requires much larger model files and more startup work.lm_head so it receives only the final hidden-state token, which is the only position used by autoregressive generation. This avoids the otherwise multi-gigabyte temporary logits allocation on a T4 without changing the generated-token distribution. PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True is also enabled to reduce allocator fragmentation.temperature=0.7top_p=0.8top_k=20repetition_penalty=1.05max_new_tokens at 2,048 for the 30-minute T4 evaluation. Retrieved text is shortened first when necessary; the current problem is never truncated.context + query and the two book JSONL files. It combines:char_wb TF-IDF over 3–5-grams;3.0 × cosine_similarity. It improves recognition of spelling, diacritics, linguistic forms, and differently formatted versions of a historical problem. All 94 string-only book examples remain eligible, including exact matches.FINAL ANSWERS: followed by one bare answer per line. Everything before the marker is retained internally as reasoning but is not submitted verbatim. Missing or empty answer blocks are rejected. A rejected sample is regenerated from a fresh conversation with a stricter format reminder, for at most two total attempts. When explanations are enabled, a deterministic second generation condenses the accepted reasoning into at most 400 new tokens for the explanation field.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_NEW_TOKENS, IOL_EXPLANATION_MAX_NEW_TOKENS, IOL_MAX_ATTEMPTS, IOL_ENABLE_EXPLANATIONS, and IOL_SEED.rag_resources/ATTRIBUTION.md for book licensing and attribution.