Instructions to use myduy/vietnamese-medical-slm-1.7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use myduy/vietnamese-medical-slm-1.7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="myduy/vietnamese-medical-slm-1.7B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("myduy/vietnamese-medical-slm-1.7B") model = AutoModelForMultimodalLM.from_pretrained("myduy/vietnamese-medical-slm-1.7B") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use myduy/vietnamese-medical-slm-1.7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "myduy/vietnamese-medical-slm-1.7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "myduy/vietnamese-medical-slm-1.7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/myduy/vietnamese-medical-slm-1.7B
- SGLang
How to use myduy/vietnamese-medical-slm-1.7B 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 "myduy/vietnamese-medical-slm-1.7B" \ --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": "myduy/vietnamese-medical-slm-1.7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "myduy/vietnamese-medical-slm-1.7B" \ --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": "myduy/vietnamese-medical-slm-1.7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use myduy/vietnamese-medical-slm-1.7B with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for myduy/vietnamese-medical-slm-1.7B to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for myduy/vietnamese-medical-slm-1.7B to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for myduy/vietnamese-medical-slm-1.7B to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="myduy/vietnamese-medical-slm-1.7B", max_seq_length=2048, ) - Docker Model Runner
How to use myduy/vietnamese-medical-slm-1.7B with Docker Model Runner:
docker model run hf.co/myduy/vietnamese-medical-slm-1.7B
Vietnamese Medical Reasoning Language Model
Reasoning Small Language Model for Vietnamese Medical Tasks
Overview
Dự án này phát triển một mô hình ngôn ngữ nhỏ (Small Language Model - SLM) có khả năng reasoning (lý luận) trong lĩnh vực y tế tiếng Việt.
Mục tiêu của mô hình là hỗ trợ xử lý ngôn ngữ tự nhiên trong các tình huống y học — bao gồm phân tích, diễn giải và đưa ra hỗ trợ ban đầu dựa trên ngữ cảnh.
Mô hình được tinh chỉnh (SFT – Supervised Fine-Tuning) trên tập dữ liệu y tế tiếng Việt, giúp cải thiện khả năng suy luận và phản hồi hợp lý trước khi tạo ra kết quả.
⚠️ Lưu ý quan trọng:
Mô hình không thay thế cho chẩn đoán chuyên môn. Kết quả cần được xác minh hoặc diễn giải dưới sự giám sát của chuyên gia y tế.
Training Framework
Quá trình huấn luyện được thực hiện bằng Unsloth — một framework tối ưu cho việc tinh chỉnh mô hình lớn trên phần cứng giới hạn.
Điều này giúp mô hình có thể được huấn luyện hiệu quả hơn trên GPU tầm trung mà vẫn đạt chất lượng cao.
Model Details
| Field | Description |
|---|---|
| Base Model | unsloth/Qwen3-1.7B-Base |
| Finetuned By | myduy |
| Framework | Unsloth + TRL |
| License | Apache 2.0 |
| Languages | Vietnamese, English |
| Primary Task | Medical reasoning & response generation |
Intended Use
- Thử nghiệm mô hình ngôn ngữ trong lĩnh vực AI y tế.
- Phát triển chatbot y tế tiếng Việt có khả năng lý luận.
Limitations
- Mô hình có thể tạo ra thông tin không chính xác hoặc lỗi suy luận.
- Không được sử dụng cho mục đích chẩn đoán hoặc điều trị y tế trực tiếp.
- Các phản hồi nên được xem là gợi ý hỗ trợ, không phải kết luận y khoa.
- Downloads last month
- 6