Views
No views yet
unsloth/Qwen2.5-3B-Instruct-bnb-4bit (QLoRA fine-tune) → Q4_K_M GGUF (~2 GB) that runs on a 4 GB GPU or CPU, offline.Qwen/Qwen2.5-14B-Instruct.claim.gbnf) constrains decoding → parseable on 100% of inputs.fact/statistic/opinion/prediction/speculation/rhetoric/other), stance
(asserted/denied/hedged/attributed/ironic), sentiment (positive/negative/neutral/mixed).contradiction/tension).ironic stance + tension link).README.md this file
config.json / *.safetensors merged fp16 model (HF format, at repo root)
generation_config.json
tokenizer.json / tokenizer_config.json / vocab.json / merges.txt / special_tokens_map.json
Qwen2.5-3B-Instruct.Q4_K_M.gguf quantized model for llama.cpp (4 GB GPU / CPU)
claim.gbnf grammar that guarantees valid JSON
prompt.txt system prompt / task instruction
schema.json output schema + label mappings (enums)
requirements.txt dependencies
LICENSE
lora_adapter/ LoRA adapter only
scripts/ inference.py inference_hf.py evaluate.py
benchmarks/ benchmarks.json benchmark_comparison.md base/teacher/finetuned scores
corpus/ labeled.jsonl converted.jsonl DATASET_MANIFEST.json CORPUS.md
training/ train_config.json RUN_SUMMARY.json1pip install -r requirements.txt
2# GGUF path needs only: pip install llama-cpp-python (add a CUDA wheel index for GPU)1python -c "from huggingface_hub import snapshot_download; snapshot_download('Luimas/claim-extractor-detective-qwen3b', local_dir='claimx')"
2cd claimx
3python scripts/inference.py --text "The mayor said crime fell; hours later the chief said it rose."1import json, glob
2from llama_cpp import Llama, LlamaGrammar
3llm = Llama(model_path=glob.glob("*.gguf")[0], n_ctx=4096, n_gpu_layers=-1, verbose=False)
4prompt = open("prompt.txt").read(); grammar = LlamaGrammar.from_string(open("claim.gbnf").read())
5out = llm.create_chat_completion(messages=[{"role":"user","content":prompt+"YOUR TEXT"}],
6 grammar=grammar, temperature=0.0, max_tokens=768)
7print(json.loads(out["choices"][0]["message"]["content"]))python scripts/inference_hf.py --text "..." (loads this repo directly).prompt.txt. Truncated to ~4000 chars.1{
2 "summary": "<1-3 sentence neutral summary>",
3 "publication_date": "<ISO date if present, else null>",
4 "keywords": ["<3-12 terms>"],
5 "claims": [{
6 "id": 0, "claim": "<brief paraphrase>",
7 "claim_type": "fact|statistic|opinion|prediction|speculation|rhetoric|other",
8 "category": "<topic>", "importance": "high|medium|low",
9 "stance": "asserted|denied|hedged|attributed|ironic",
10 "sentiment": "positive|negative|neutral|mixed",
11 "evidence_span": "<verbatim substring>", "confidence": 0.0,
12 "verification_questions": ["<3-6 investigative questions>"]
13 }],
14 "contradictions": [{"claim_a": 0, "claim_b": 1, "relation": "contradiction|tension", "explanation": "<why>"}]
15}schema.json. Guarantees: always-valid JSON; keywords/claims
non-empty; ids 0..n-1; no duplicate claims; evidence_span verbatim; ≥3 verification questions/claim;
contradictions reference real ids.Qwen/Qwen2.5-14B-Instruct teacher labels passages into the schema; the unsloth/Qwen2.5-3B-Instruct-bnb-4bit student learns to reproduce it.
Best checkpoint kept by eval-loss; data balanced per source with hand-authored gold examples upweighted.
Full hyper-parameters in training/train_config.json; run details in training/RUN_SUMMARY.json.corpus/ (self-contained): labeled.jsonl (teacher-labeled + hand-authored gold
examples) + converted.jsonl (SNLI/MNLI/ANLI/FEVER/LIAR templated). See corpus/CORPUS.md and
corpus/DATASET_MANIFEST.json. Trained on ~1471 examples (val ~127).benchmarks/benchmarks.json,
benchmark_comparison.md). Fine-tuned highlights:| Metric | Base | Fine-tuned |
|---|---|---|
| JSON validity | 1.0 | 1.0 |
| Verification-questions / claim | — | 3 |
| Contradiction recall | — | 0.75 |
| Sarcasm handling | — | 1.0 |
| Evidence-verbatim rate | — | 1.0 |
| Avg claim length (words) | — | 7.806 |
python scripts/evaluate.py.Qwen2.5-3B-Instruct.Q4_K_M.gguf + claim.gbnf + prompt.txt.1pip install llama-cpp-python # CUDA: --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cu124
2python scripts/inference.py --text "Paste any English paragraph."1@misc{claim_extractor_qwen3b,
2 title = {Claim Extractor: a local, grammar-constrained claim-extraction model (Qwen2.5-3B, QLoRA)},
3 author = {Luimas},
4 year = {2026},
5 note = {Hugging Face: Luimas/claim-extractor-detective-qwen3b}
6}LICENSE). Inherits the license terms of the base model unsloth/Qwen2.5-3B-Instruct-bnb-4bit.