fix: enable sampling β temperature=0.8 for MCQ, 0.4 for evaluatorβ
Mehdi
8f2e039
Greedy decoding (do_sample=False) caused the model to repeat the same
answer for all 4 MCQ options (e.g. 4x BERT) and to copy source text
verbatim for the model answer. Sampling breaks the repetition loop and
produces diverse, coherent outputs.
feat: retarget fine-tune pipeline to MiniCPM4.1-8Bβ
Mehdi
f5c39d2
- train_modal.py: BASE_MODEL β openbmb/MiniCPM4.1-8B
HUB_REPO β build-small-hackathon/MiniCPM4.1-8B-PaperProf
enable_thinking=False in apply_chat_template
- convert_gguf_modal.py: SRC/GGUF repos updated to 4.1 names
- model/llm.py: DEFAULT_MODEL_ID and GGUF_REPO point to new fine-tune repos
feat: upgrade to MiniCPM4.1-8B + official GGUF, disable thinking modeβ
Mehdi
5ad43b3
- DEFAULT_MODEL_ID β openbmb/MiniCPM4.1-8B
- DEFAULT_GGUF_REPO β openbmb/MiniCPM4.1-8B-GGUF
- enable_thinking=False in apply_chat_template to suppress chain-of-thought
tokens and keep structured question/evaluation outputs clean
- transformers==4.57.1 satisfies the new >=4.56 requirement, no pin change needed
feat: llama.cpp runtime ready for the Space (Llama Champion)β
Mehdi
a474fe5
- llama-cpp-python in requirements
- LlamaCppLLM defaults to CPU on ZeroGPU Spaces (CUDA context does not
survive between @spaces.GPU windows), overridable via
PAPERPROF_GGUF_GPU_LAYERS
- GGUF conversion job disk fix (512 GiB Modal minimum)
feat: switch to our fine-tuned MiniCPM4-8B-PaperProf model (Well-Tuned)β
Mehdi
2c3748a
QLoRA fine-tune published at build-small-hackathon/MiniCPM4-8B-PaperProf,
trained on 3000 SQuAD pairs formatted with the production prompt.
feat: Well-Tuned + Llama Champion groundworkβ
Mehdi
8087133
- finetune/train_modal.py: QLoRA fine-tune of MiniCPM4-8B on SQuAD pairs
formatted with the production prompt, merged and pushed to the Hub
- finetune/convert_gguf_modal.py: GGUF f16 + Q4_K_M conversion of the
fine-tuned model, pushed to a -GGUF repo
- model/llm.py: llama.cpp runtime backend (LlamaCppLLM) selected via
PAPERPROF_RUNTIME=llamacpp, transformers stays the default
fix: skip bitsandbytes on HF Spaces (ZeroGPU), only use 4-bit locally
Mehdi
56cd204
fix: infinite spinner on question gen, 4-bit quant for low VRAMβ
Mehdi
12c4c0f
- new_question returns error text in question_box (was empty string)
so JS polling can detect completion even on failure
- JS polling exits spinner on error instead of waiting forever
- @spaces.GPU timeout raised 60s -> 180s
- LLM loads in 4-bit (bitsandbytes) when VRAM < 17GB, bfloat16 otherwise
- Pre-load libnvJitLink.so.13 so bitsandbytes works locally with cu130
- Add bitsandbytes to requirements.txt
feat: switch to MiniCPM4-8B, add robustness, score tracker, language selectorβ
Mehdi
83ec3f5
- model/llm.py: upgrade to MiniCPM4-8B with bfloat16 and chat template
- requirements.txt: relax transformers pin to >=4.50.0
- core/parser.py: handle corrupt/scanned/empty PDFs with clear errors
- app.py: graceful error handling in all pipeline steps
- app.py: session score tracker (correct/total with verdict parsing)
- app.py: FR/EN language selector wired to question and evaluation prompts
- core/questioner.py: language param in prompt
- core/evaluator.py: language param in prompt
fix: switch to MiniCPM3-4B for better transformers compatibility