Instructions to use ChenWeiLi/Taiwan-inquiry_7B_v2.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ChenWeiLi/Taiwan-inquiry_7B_v2.0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ChenWeiLi/Taiwan-inquiry_7B_v2.0") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ChenWeiLi/Taiwan-inquiry_7B_v2.0") model = AutoModelForCausalLM.from_pretrained("ChenWeiLi/Taiwan-inquiry_7B_v2.0") 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
- vLLM
How to use ChenWeiLi/Taiwan-inquiry_7B_v2.0 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ChenWeiLi/Taiwan-inquiry_7B_v2.0" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ChenWeiLi/Taiwan-inquiry_7B_v2.0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ChenWeiLi/Taiwan-inquiry_7B_v2.0
- SGLang
How to use ChenWeiLi/Taiwan-inquiry_7B_v2.0 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 "ChenWeiLi/Taiwan-inquiry_7B_v2.0" \ --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": "ChenWeiLi/Taiwan-inquiry_7B_v2.0", "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 "ChenWeiLi/Taiwan-inquiry_7B_v2.0" \ --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": "ChenWeiLi/Taiwan-inquiry_7B_v2.0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ChenWeiLi/Taiwan-inquiry_7B_v2.0 with Docker Model Runner:
docker model run hf.co/ChenWeiLi/Taiwan-inquiry_7B_v2.0
🔎 Taiwan-inquiry_7B_v_2.0
"The model was fine-tuned based on the Breeze-7B-Instruct-v0_1 model using a dataset that includes 614 authentic dialogues from the National Cheng Kung University Hospital.
Additionally, 336 synthetic dialogues were included in the training set, carefully crafted to encompass themes drawn from sample questions of the OSCE (臨床技能測驗) sample questions in Taiwan.
These synthetic dialogues were generated using GPT-3.5, Gemini-Pro and Breexe-8x7B-Instruct-v0_1.
The training process was geared towards simulating verbal exchanges between doctors and patients within a hospital environment.
"
**************************** Updates ****************************
- 2024/03/23 🎉 Released Taiwan-inquiry_7B_v2.0.gguf
Model Description
- Developed by: Joseph (Chen-Wei) Li, researcher assistant from National Taiwan University Hospital.
- Model type: A 7B parameter GPT-like model fine-tuned on a combination of private and synthetic dialogue datasets.
- Language(s) (NLP): Traditional Chinese (zh-tw)
- Finetuned from model : Breeze-7B-Instruct-v0_1
Usage of the model
- The user can take on the role of a doctor, and the model can engage in conversation with you as if it were a patient.
- You can provide the model with a brief patient background in the system prompt, and the model will respond based on that prompt. (see Examples)
- Directly asking the certain disease about the symptoms and the possible therapies.(Warning: It's not medical advice!)
Demo
- Downloads last month
- 7


