likhithv/knowledgemesh-benchmark-eval
Preview • Updated • 40
How to use likhithv/meta-sdk-baseline with PEFT:
from peft import PeftModel
from transformers import AutoModelForCausalLM
base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.5-4B")
model = PeftModel.from_pretrained(base_model, "likhithv/meta-sdk-baseline")How to use likhithv/meta-sdk-baseline with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="likhithv/meta-sdk-baseline")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("likhithv/meta-sdk-baseline", dtype="auto")How to use likhithv/meta-sdk-baseline with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "likhithv/meta-sdk-baseline"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "likhithv/meta-sdk-baseline",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/likhithv/meta-sdk-baseline
How to use likhithv/meta-sdk-baseline with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "likhithv/meta-sdk-baseline" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "likhithv/meta-sdk-baseline",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker run --gpus all \
--shm-size 32g \
-p 30000:30000 \
-v ~/.cache/huggingface:/root/.cache/huggingface \
--env "HF_TOKEN=<secret>" \
--ipc=host \
lmsysorg/sglang:latest \
python3 -m sglang.launch_server \
--model-path "likhithv/meta-sdk-baseline" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "likhithv/meta-sdk-baseline",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use likhithv/meta-sdk-baseline with Docker Model Runner:
docker model run hf.co/likhithv/meta-sdk-baseline
LoRA adapter for Qwen/Qwen3.5-4B fine-tuned on 1,209 chunk-based training samples generated by Meta's Synthetic Data Kit from the same financial and medical source documents.
This is the Meta SDK baseline model from the paper "Knowledge Graph-Guided Fine-Tuning Data Generation: A Rigorous Benchmark" — the industry-standard chunk-based approach used as the comparison point against KnowledgeMesh.
Evaluated by Gemini 2.5 Flash pointwise judge (1–5 scale, 4 dimensions):
| Eval Set | Base | This Model | KM Full | Delta (KM − this) |
|---|---|---|---|---|
| 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 |
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
import torch
base_model_id = "Qwen/Qwen3.5-4B"
adapter_id = "likhithv/meta-sdk-baseline"
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
base_model = AutoModelForCausalLM.from_pretrained(
base_model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
)
model = PeftModel.from_pretrained(base_model, adapter_id)
messages = [{"role": "user", "content": "What were Apple's total net sales in 2023?"}]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True)
outputs = model.generate(inputs.to(model.device), max_new_tokens=256)
print(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 | 1,209 (chunk-based QA, Meta Synthetic Data Kit) |
| 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/km-full-model — KnowledgeMesh, 4,361 KG-guided samples (+0.72 on independent eval)@misc{knowledgemesh2026,
title={Knowledge Graph-Guided Fine-Tuning Data Generation: A Rigorous Benchmark},
author={Likhith V},
year={2026},
howpublished={https://huggingface.co/likhithv/meta-sdk-baseline}
}