Instructions to use LingJianAI/Lingjian-1.5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LingJianAI/Lingjian-1.5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="LingJianAI/Lingjian-1.5") 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, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("LingJianAI/Lingjian-1.5") model = AutoModelForMultimodalLM.from_pretrained("LingJianAI/Lingjian-1.5") 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 Settings
- vLLM
How to use LingJianAI/Lingjian-1.5 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LingJianAI/Lingjian-1.5" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LingJianAI/Lingjian-1.5", "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/LingJianAI/Lingjian-1.5
- SGLang
How to use LingJianAI/Lingjian-1.5 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 "LingJianAI/Lingjian-1.5" \ --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": "LingJianAI/Lingjian-1.5", "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 "LingJianAI/Lingjian-1.5" \ --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": "LingJianAI/Lingjian-1.5", "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 LingJianAI/Lingjian-1.5 with Docker Model Runner:
docker model run hf.co/LingJianAI/Lingjian-1.5
Model Card for Lingjian-1.5
Lingjian-1.5 is a specialized vision-language model for clinical laboratory medicine. It is designed for microscopic image understanding, cell identification, morphological analysis, clinical laboratory question answering, and key target localization.
Compared with Lingjian-1.0-Chat, Lingjian-1.5 is a qualitative upgrade with improved microscopy understanding accuracy, stronger instruction following, and better conversational ability. These improvements are intended to make the model more reliable in clinical laboratory image analysis, more responsive to user-specified answer formats, and more natural in open-ended or multi-turn dialogue.
Model Details
Model Description
Lingjian-1.5 ("灵检" signifies "Intelligent Laboratory Testing" in Chinese) is a domain-adapted multimodal model for clinical laboratory applications. The model continues the Lingjian series' focus on microscope-based laboratory scenarios, including blood cell morphology, abnormal finding recognition, concise report generation, medical terminology normalization, and localization-style responses.
This release is trained on a broader and more refined mixture of laboratory image-text data, grounding data, instruction-following data, self-cognition data, and general conversation data. The added training mix improves the model's ability to follow detailed instructions while preserving domain-specific visual reasoning.
- Developed by: LingJian AI Research Team
- Model type: Vision-Language Model for Medical Imaging
- Architecture: Qwen3-VL series vision-language architecture
- Language(s): Chinese (primary), English
- Tensor type: BF16
- License: Apache-2.0
- Finetuned from model: Qwen/Qwen3-VL-8B-Instruct and Lingjian internal intermediate checkpoints
What's New in Lingjian-1.5
Lingjian-1.5 improves over Lingjian-1.0-Chat in three main areas:
- Accuracy: More reliable recognition of clinically relevant microscopic findings, better handling of morphology-oriented questions, and fewer omissions in image descriptions.
- Instruction following: Better adherence to requested answer style, level of detail, localization prompts, concise report formats, and domain-specific terminology requirements.
- Dialogue: Improved ability to answer natural user questions, maintain context in multi-turn interactions, and provide clearer explanations in both clinical laboratory and general conversational settings.
These statements describe qualitative release-level improvements. Users should run task-specific validation before relying on the model in production or clinical workflows.
Model Sources
- Repository: https://huggingface.co/LingJianAI/Lingjian-1.5
- Previous version: https://huggingface.co/LingJianAI/Lingjian-1.0-Chat
- Paper: Technical report in preparation
Uses
Direct Use
- Clinical laboratory image understanding and secondary review
- Microscopic cell identification and morphology description
- Abnormal finding recognition and concise report drafting
- Laboratory quality control and morphology training
- Medical education and teaching demonstrations
- Research data screening and analysis
Downstream Use
- Specialized fine-tuning for specific laboratory sub-domains
- Integration with laboratory information systems
- Development of automated reporting or review-assistance tools
- Dataset triage, annotation assistance, and expert review workflows
Out-of-Scope Use
- Primary diagnosis without qualified human supervision
- Emergency, high-stakes, or fully automated clinical decision-making
- Applications outside clinical laboratory medicine without additional validation
- Pixel-level detection tasks requiring specialized detection models
- Non-medical image analysis as a general-purpose vision model
Bias, Risks, and Limitations
- The model is intended as an auxiliary tool and must not replace qualified medical professionals.
- Performance may vary for rare cell types, unusual staining conditions, poor image quality, or out-of-distribution instruments.
- Bounding box or localization outputs may be less precise than task-specific detection models.
- The model is optimized primarily for Chinese clinical laboratory terminology; English support is available but may be less mature in specialized contexts.
- The model may produce plausible but incorrect statements, especially under ambiguous images or insufficient context.
- Clinical deployment requires local validation, quality assurance, and workflow-specific risk controls.
Recommendations
Users should verify outputs with qualified clinical laboratory professionals. Clinical decisions should not be based solely on model predictions. For deployment, evaluate the model on representative local data, define human review requirements, and monitor errors across sample types, staining protocols, and instrument sources.
How to Get Started with the Model
The model can be loaded with transformers. Use a recent version with Qwen3-VL support.
import torch
from PIL import Image
from transformers import AutoProcessor, Qwen3VLForConditionalGeneration
model_id = "LingJianAI/Lingjian-1.5"
model = Qwen3VLForConditionalGeneration.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
)
processor = AutoProcessor.from_pretrained(model_id)
image = Image.open("microscope_image.jpg").convert("RGB")
messages = [
{
"role": "user",
"content": [
{"type": "image", "image": image},
{"type": "text", "text": "请分析这张显微图像,指出关键细胞和异常形态。"},
],
}
]
text = processor.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
)
inputs = processor(
text=[text],
images=[image],
return_tensors="pt",
).to(model.device)
generated_ids = model.generate(**inputs, max_new_tokens=512)
generated_ids = [
output_ids[len(input_ids):]
for input_ids, output_ids in zip(inputs.input_ids, generated_ids)
]
response = processor.batch_decode(
generated_ids,
skip_special_tokens=True,
clean_up_tokenization_spaces=False,
)[0]
print(response)
For localization-style tasks, use explicit instructions such as:
识别图中的关键细胞并标记位置。/bbox
Citation
If you use Lingjian-1.5 in research or products, please cite the model repository and the forthcoming technical report.
- Downloads last month
- 30