Views
No views yet
ingest pipeline. Use
this repo when you want a standalone model to serve or convert; the standalone
LoRA adapter is at
lewisdog/qwen3-1.7b-cogs-ingest-lora.| task | required top-level JSON keys |
|---|---|
extract | summary, key_claims (+ quotes/entities) |
suggest_links | linked_claims |
page_update | topic, section_md, relevant |
contradiction | findings |
1# converts + 4-bit quantizes into an MLX model dir
2python3 -m mlx_lm.convert --hf-path lewisdog/qwen3-1.7b-cogs-ingest -q --mlx-path qwen3-cogs-ingest-mlx
3# then drop into ~/.omlx/models and point cogs [llm] at itextract,
suggest_links): it keeps appending list items and never emits <|im_end|>,
leaving valid-but-unterminated JSON. Fix with either:repetition_penalty ≈ 1.1 (keeps determinism), ortemperature=0.7, top_p=0.8, top_k=20
(this model's bundled generation_config.json already samples at temp 0.6,
which sidesteps the issue — just don't override it to temp-0 greedy).enable_thinking=False and stop on <|im_end|>.1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model = AutoModelForCausalLM.from_pretrained(
4 "lewisdog/qwen3-1.7b-cogs-ingest", dtype="bfloat16", device_map="auto"
5).eval()
6tok = AutoTokenizer.from_pretrained("lewisdog/qwen3-1.7b-cogs-ingest")
7
8enc = tok.apply_chat_template(
9 messages, add_generation_prompt=True, enable_thinking=False,
10 return_tensors="pt", return_dict=True,
11).to(model.device)
12out = model.generate(**enc, max_new_tokens=2048, do_sample=False,
13 repetition_penalty=1.1, pad_token_id=tok.pad_token_id)
14print(tok.decode(out[0, enc["input_ids"].shape[1]:], skip_special_tokens=True))cogs distill chat pairs, 2 epochs, effective batch 16,
max_seq 8192, lr 1e-4 cosine, bf16, on an NVIDIA DGX Spark (GB10).
Train loss 2.55 → 1.41; eval loss 1.125 → 1.118 (still decreasing); eval
token-accuracy 0.756. Full details: adapter repo card + RESULTS.md.