Qwen-2.5-7B-Instruct-TMJ

A fine-tune of Qwen2.5-7B-Instruct that extracts structured symptoms and diagnoses from free-text temporomandibular joint (TMJ) consultation notes and returns them as JSON.

It is the "TMJ" model of the CNE (Clinical Note Extraction) module of SlicerAutomatedDentalTools.

Files

File Content
qwen-ft-q4_k_m.gguf Merged LoRA fine-tune, quantized to Q4_K_M for llama.cpp (4.7 GB)
LICENSE Apache License 2.0

Usage

from huggingface_hub import hf_hub_download
from llama_cpp import Llama

path = hf_hub_download("DCBIA-OrthoLab/Qwen-2.5-7B-Instruct-TMJ", "qwen-ft-q4_k_m.gguf")
llm = Llama(model_path=path, n_gpu_layers=-1, n_ctx=6144, verbose=False)
out = llm.create_chat_completion(
    messages=[
        {"role": "system", "content": "Using the following note, extract structured key-value pairs about the patient's symptoms and diagnoses:"},
        {"role": "user", "content": note_text},
    ],
    max_tokens=500,
    temperature=0.1,
)
print(out["choices"][0]["message"]["content"])

Training

  • Base model: unsloth/Qwen2.5-7B-Instruct (Qwen2.5-7B-Instruct, Apache 2.0).
  • Method: LoRA (r = 32, alpha = 64) with Unsloth, then merged and quantized to Q4_K_M.
  • Data: annotated TMJ consultation notes. The notes are patient data and are not released; train, validation and test sets were split by patient.
  • Code: ortho-cde-llm-extraction.

Modifications

This model is a modified version of Qwen2.5-7B-Instruct: its weights were changed by the fine-tuning above, then quantized. It is not endorsed by the Qwen team.

Intended use and limitations

For research on structured extraction from clinical notes. It is not a medical device and must not be used for diagnosis or treatment decisions without review by a clinician. Its accuracy on notes written in another style or template than its training notes is unknown.

License

Apache License 2.0, as the base model. See LICENSE.

Citation

Base model:

@misc{qwen2.5,
    title = {Qwen2.5: A Party of Foundation Models},
    url = {https://qwenlm.github.io/blog/qwen2.5/},
    author = {Qwen Team},
    month = {September},
    year = {2024}
}
Downloads last month
41
GGUF
Model size
8B params
Architecture
qwen2
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for DCBIA-OrthoLab/Qwen-2.5-7B-Instruct-TMJ

Base model

Qwen/Qwen2.5-7B
Quantized
(447)
this model