Image-Text-to-Text
Transformers
Safetensors
English
qwen3_5
vision-language
lora-merged
continued-pretraining
spinal-cord-stimulation
medical
conversational
Instructions to use achuthc1298/qwen_llm_scs with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use achuthc1298/qwen_llm_scs with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="achuthc1298/qwen_llm_scs") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("achuthc1298/qwen_llm_scs") model = AutoModelForImageTextToText.from_pretrained("achuthc1298/qwen_llm_scs") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use achuthc1298/qwen_llm_scs with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "achuthc1298/qwen_llm_scs" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "achuthc1298/qwen_llm_scs", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/achuthc1298/qwen_llm_scs
- SGLang
How to use achuthc1298/qwen_llm_scs with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "achuthc1298/qwen_llm_scs" \ --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": "achuthc1298/qwen_llm_scs", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
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 "achuthc1298/qwen_llm_scs" \ --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": "achuthc1298/qwen_llm_scs", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use achuthc1298/qwen_llm_scs with Docker Model Runner:
docker model run hf.co/achuthc1298/qwen_llm_scs
qwen_llm_scs — Qwen3.5-VL 27B continued-pretrained on spinal cord stimulation literature
Full multimodal (text + vision) model. A LoRA adapter trained on spinal cord stimulation (SCS) papers has been merged into the base Qwen/Qwen3.6-27B weights. The vision tower is unchanged from the base; only the language layers were adapted.
Model details
- Architecture:
Qwen3_5ForConditionalGeneration(model_type: qwen3_5) - Base model:
Qwen/Qwen3.6-27B(full VLM) - Adaptation: LoRA
r=16,alpha=32, dropout0.05, continued pre-training - LoRA targets:
q_proj, k_proj, v_proj, o_proj, out_proj, gate_proj, up_proj, down_proj(language layers only — vision tower not touched) - Precision: BF16 (base FP8 dequantized at load time, then LoRA merged)
- Size: ~51 GB, 12 safetensors shards
- Domain: spinal cord stimulation clinical and engineering literature
Usage
import torch
from transformers import AutoModelForImageTextToText, AutoProcessor
repo = "achuthc1298/qwen_llm_scs"
processor = AutoProcessor.from_pretrained(repo, trust_remote_code=True)
model = AutoModelForImageTextToText.from_pretrained(
repo,
dtype=torch.bfloat16,
device_map="auto",
trust_remote_code=True,
attn_implementation="sdpa",
)
model.eval()
# Text-only
messages = [{"role": "user", "content": [{"type": "text", "text": "Summarize the principle of high-frequency SCS."}]}]
inputs = processor.apply_chat_template(messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=400, do_sample=False)
print(processor.decode(out[0, inputs["input_ids"].shape[1]:], skip_special_tokens=True))
# Vision (figure from a paper)
from PIL import Image
img = Image.open("figure.png").convert("RGB")
messages = [{"role": "user", "content": [
{"type": "image", "image": img},
{"type": "text", "text": "Describe this figure."},
]}]
inputs = processor.apply_chat_template(messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=400, do_sample=False)
print(processor.decode(out[0, inputs["input_ids"].shape[1]:], skip_special_tokens=True))
Hardware
Tested on 2× RTX A6000 (48 GB each) with device_map="auto" and per-GPU memory limits of 44 GiB. Total VRAM at inference ≈ 57 GB in BF16.
Notes
- The vision tower (
model.visual.*) is identical to the base model — only the language layers received SCS-domain LoRA updates. - Loading uses the native
qwen3_5integration in moderntransformers; no custom remote code is bundled. - The chat template is the standard Qwen3-VL template.
License
Inherits the Qwen license of the base model.
- Downloads last month
- 33
Model tree for achuthc1298/qwen_llm_scs
Base model
Qwen/Qwen3.6-27B