Downloads · 30 days
114
41% of all-time downloads
lhpku20010120/qwen3.5-2b-k12kgraph
qwen3.5-2b-k12kgraph is a image-text-to-text model from lhpku20010120. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
Qwen3.5-2B-K12KGraph is a supervised fine-tuning (SFT) model based on Qwen/Qwen3.5-2B-Base. It was trained on the K12-Train data associated with the K12-KGraph project for educational question answering.
Downloads · 30 days
114
41% of all-time downloads
All-time downloads
281
Public
Parameters
2.2B
4.5 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors4.4 GB · 100%
From the Hugging Face model README
Qwen3.5-2B-K12KGraph is a supervised fine-tuning (SFT) model based on Qwen/Qwen3.5-2B-Base. It was trained on the K12-Train data associated with the K12-KGraph project for educational question answering.
This repository contains a standalone Transformers checkpoint with the trained LoRA adapter merged into the base model weights.
The model is intended for research on K-12 educational question answering, knowledge-intensive reasoning, and evaluation of models trained with knowledge-graph-derived educational data.
import torch
from transformers import AutoModelForImageTextToText, AutoProcessor
model_id = "lhpku20010120/qwen3.5-2b-k12kgraph"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForImageTextToText.from_pretrained(
model_id,
dtype=torch.bfloat16,
device_map="auto",
)
messages = [
{
"role": "user",
"content": [
{
"type": "text",
"text": "Explain the difference between the light-dependent and light-independent reactions in photosynthesis.",
}
],
}
]
inputs = processor.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=True,
return_dict=True,
return_tensors="pt",
).to(model.device)
with torch.inference_mode():
outputs = model.generate(
**inputs,
max_new_tokens=512,
do_sample=False,
)
generated_ids = outputs[:, inputs["input_ids"].shape[-1]:]
answer = processor.batch_decode(
generated_ids,
skip_special_tokens=True,
)[0]
print(answer)
The model uses the included chat_template.jinja, which follows the Qwen3.5 multimodal chat format.
The following information was recovered from the exported trainer metadata:
| Setting | Value |
|---|---|
| Base model | Qwen/Qwen3.5-2B-Base |
| Epochs | 3 |
| Per-device batch size | 4 |
| Gradient accumulation | 2 |
| Number of devices | 8 |
| Effective global batch size | 64 |
| Learning rate | 1e-4 |
| Scheduler | cosine |
| Warmup ratio | 0.1 |
| Optimizer | AdamW |
| Seed | 42 |
| Transformers | 5.6.0 |
| PEFT | 0.18.1 |
| PyTorch | 2.5.1+cu121 |
| Datasets | 3.2.0 |
| Tokenizers | 0.22.2 |
Users are responsible for complying with the licenses and terms associated with the base model, training data, benchmark data, and generated content. The release of model weights does not grant rights to reproduce any third-party textbook or benchmark material.
This model is based on Qwen3.5-2B-Base and was trained with LoRA using LLaMA-Factory, then merged into the base model weights for release. Please cite the Qwen3.5 and K12-KGraph projects when using this model in research.