Views
No views yet
Qwen/Qwen3.5-4B fine-tuned on 4,361 knowledge graph-guided training samples generated by the KnowledgeMesh pipeline from financial (Apple 10-K) and medical (PubMed abstracts) documents.| Eval Set | Base | Meta SDK | This Model | Delta |
|---|---|---|---|---|
| Primary (n=473, KM-generated) | 1.79 | 1.93 | 2.47 | +0.54 |
| Independent (n=955, Gemini-generated) | 1.96 | 2.17 | 2.90 | +0.72 |
1from transformers import AutoTokenizer, AutoModelForCausalLM
2from peft import PeftModel
3import torch
4
5base_model_id = "Qwen/Qwen3.5-4B"
6adapter_id = "likhithv/km-full-model"
7
8tokenizer = AutoTokenizer.from_pretrained(base_model_id)
9base_model = AutoModelForCausalLM.from_pretrained(
10 base_model_id,
11 torch_dtype=torch.bfloat16,
12 device_map="auto",
13)
14model = PeftModel.from_pretrained(base_model, adapter_id)
15
16messages = [{"role": "user", "content": "What are the main risk factors for type 2 diabetes?"}]
17inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True)
18outputs = model.generate(inputs.to(model.device), max_new_tokens=256)
19print(tokenizer.decode(outputs[0][inputs.shape[-1]:], skip_special_tokens=True))| Parameter | Value |
|---|---|
| Base model | Qwen/Qwen3.5-4B (4-bit quantized via bitsandbytes) |
| Fine-tuning method | LoRA (rank=16, alpha=16) |
| Training samples | 4,361 (KG-guided: atomic, aggregated, multihop, chain-of-thought) |
| Epochs | 3 |
| Learning rate | 2e-4 |
| Effective batch size | 8 |
| Hardware | Kaggle T4 GPU (16 GB) |
| Domains | Financial (Apple 10-K 2023), Medical (PubMed abstracts) |
likhithv/knowledgemesh-benchmark-eval — both primary (n=473) and independent (n=955) eval setslikhithv/meta-sdk-baseline — trained on 1,209 chunk-based samples (Meta Synthetic Data Kit)1@misc{knowledgemesh2026,
2 title={Knowledge Graph-Guided Fine-Tuning Data Generation: A Rigorous Benchmark},
3 author={Likhith V},
4 year={2026},
5 howpublished={https://huggingface.co/likhithv/km-full-model}
6}