SemanticWiki Coder 7B v2 — merged model

What?

This is a standalone Transformers model that generates DeepWiki-style technical documentation from source code. It can produce structured Markdown, source-file references, Mermaid diagrams, tables, and inline citations.

The original fine-tune was a LoRA adapter trained on top of Qwen/Qwen2.5-Coder-7B-Instruct. This repository contains the adapter merged into the base weights, so users do not need PEFT or a separate adapter repository.

Why?

The merged format is easier to use with standard Transformers tooling and is the required starting point for conversion to Apple-Silicon MLX format. The merge changes packaging, not the model's intended behavior.

Quick start

from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "GhostScientist/semanticwiki-coder-7b-v2-merged"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    torch_dtype="auto",
    device_map="auto",
)

messages = [
    {"role": "user", "content": "<START_OF_CONTEXT>\n[source code]\n<END_OF_CONTEXT>\n\n<query>\nExplain the architecture.\n</query>"}
]
prompt = tokenizer.apply_chat_template(
    messages, tokenize=False, add_generation_prompt=True
)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=1024)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

Intended use

  • Generate first drafts of codebase wikis and architecture notes.
  • Keep the supplied source context bounded and review generated citations.
  • Use a low temperature for factual documentation and a higher temperature only when exploring alternative explanations.

Limitations and safety

  • Citations, diagrams, and explanations can be incorrect or incomplete.
  • The model should not be treated as a security auditor or a substitute for human code review.
  • Do not include secrets, credentials, or private source code in prompts sent to an untrusted service.
  • This model was trained on a small supervised dataset; quality may vary by language, framework, and repository size.

Provenance

License

The base model is distributed under its upstream license. Review the base model card and applicable terms before redistribution or commercial use.

Downloads last month
213
Safetensors
Model size
8B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for GhostScientist/semanticwiki-coder-7b-v2-merged

Base model

Qwen/Qwen2.5-7B
Finetuned
(456)
this model
Quantizations
2 models