Text Generation
Transformers
Safetensors
qwen3_5_text
medical
agent
tool-use
web-search
reinforcement-learning
conversational
Instructions to use xiaohan666/MedSearch-R1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use xiaohan666/MedSearch-R1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="xiaohan666/MedSearch-R1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("xiaohan666/MedSearch-R1") model = AutoModelForCausalLM.from_pretrained("xiaohan666/MedSearch-R1", device_map="auto") 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 xiaohan666/MedSearch-R1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "xiaohan666/MedSearch-R1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "xiaohan666/MedSearch-R1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/xiaohan666/MedSearch-R1
- SGLang
How to use xiaohan666/MedSearch-R1 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 "xiaohan666/MedSearch-R1" \ --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": "xiaohan666/MedSearch-R1", "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 "xiaohan666/MedSearch-R1" \ --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": "xiaohan666/MedSearch-R1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use xiaohan666/MedSearch-R1 with Docker Model Runner:
docker model run hf.co/xiaohan666/MedSearch-R1
| bbedc3fda3305820b977265f01b8619d87570a6739de3a5582c3464840f1e57a LICENSE | |
| 202f3750945e91ee4af757a751dfa70f6d6fdfa4fcfdb7fdfc52edad523e6be7 README.md | |
| a4aee8afcf2e0711942cf848899be66016f8d14a889ff9ede07bca099c28f715 chat_template.jinja | |
| eaf4148e2b89c65660fb33874e6c62b8db4ec521ddbd46e7dac205ac56dedef6 config.json | |
| eda6aa8b0fbde9fbe38c044c6ba3c2890d4a9aad3cdd348da5ffe0ff0f91df09 generation_config.json | |
| d1bdfe1257e7366eb6ac7a918ae3d009b7e11b170f027530b2778379926d0fa0 model.safetensors | |
| 87a7830d63fcf43bf241c3c5242e96e62dd3fdc29224ca26fed8ea333db72de4 tokenizer.json | |
| 83febe739ecefd99f984f546dfdc10149cedf293b9ee0291b99894341188b613 tokenizer_config.json | |