Instructions to use DCBIA-OrthoLab/Qwen-2.5-7B-Instruct-TMJ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use DCBIA-OrthoLab/Qwen-2.5-7B-Instruct-TMJ with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf DCBIA-OrthoLab/Qwen-2.5-7B-Instruct-TMJ:Q4_K_M # Run inference directly in the terminal: llama cli -hf DCBIA-OrthoLab/Qwen-2.5-7B-Instruct-TMJ:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf DCBIA-OrthoLab/Qwen-2.5-7B-Instruct-TMJ:Q4_K_M # Run inference directly in the terminal: llama cli -hf DCBIA-OrthoLab/Qwen-2.5-7B-Instruct-TMJ:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf DCBIA-OrthoLab/Qwen-2.5-7B-Instruct-TMJ:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf DCBIA-OrthoLab/Qwen-2.5-7B-Instruct-TMJ:Q4_K_M
Use Docker
docker model run hf.co/DCBIA-OrthoLab/Qwen-2.5-7B-Instruct-TMJ:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use DCBIA-OrthoLab/Qwen-2.5-7B-Instruct-TMJ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DCBIA-OrthoLab/Qwen-2.5-7B-Instruct-TMJ" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DCBIA-OrthoLab/Qwen-2.5-7B-Instruct-TMJ", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/DCBIA-OrthoLab/Qwen-2.5-7B-Instruct-TMJ:Q4_K_M
- Ollama
How to use DCBIA-OrthoLab/Qwen-2.5-7B-Instruct-TMJ with Ollama:
ollama run hf.co/DCBIA-OrthoLab/Qwen-2.5-7B-Instruct-TMJ:Q4_K_M
- Unsloth Desktop
- Pi
How to use DCBIA-OrthoLab/Qwen-2.5-7B-Instruct-TMJ with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf DCBIA-OrthoLab/Qwen-2.5-7B-Instruct-TMJ:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "DCBIA-OrthoLab/Qwen-2.5-7B-Instruct-TMJ:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use DCBIA-OrthoLab/Qwen-2.5-7B-Instruct-TMJ with Docker Model Runner:
docker model run hf.co/DCBIA-OrthoLab/Qwen-2.5-7B-Instruct-TMJ:Q4_K_M
- Lemonade
How to use DCBIA-OrthoLab/Qwen-2.5-7B-Instruct-TMJ with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull DCBIA-OrthoLab/Qwen-2.5-7B-Instruct-TMJ:Q4_K_M
Run and chat with the model
lemonade run user.Qwen-2.5-7B-Instruct-TMJ-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use DCBIA-OrthoLab/Qwen-2.5-7B-Instruct-TMJ with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf DCBIA-OrthoLab/Qwen-2.5-7B-Instruct-TMJ:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default DCBIA-OrthoLab/Qwen-2.5-7B-Instruct-TMJ:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use DCBIA-OrthoLab/Qwen-2.5-7B-Instruct-TMJ with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf DCBIA-OrthoLab/Qwen-2.5-7B-Instruct-TMJ:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "DCBIA-OrthoLab/Qwen-2.5-7B-Instruct-TMJ:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
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
4-bit