Instructions to use StanfordAIMI/CheXagent-8b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use StanfordAIMI/CheXagent-8b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="StanfordAIMI/CheXagent-8b", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("StanfordAIMI/CheXagent-8b", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use StanfordAIMI/CheXagent-8b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "StanfordAIMI/CheXagent-8b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "StanfordAIMI/CheXagent-8b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/StanfordAIMI/CheXagent-8b
- SGLang
How to use StanfordAIMI/CheXagent-8b 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 "StanfordAIMI/CheXagent-8b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "StanfordAIMI/CheXagent-8b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "StanfordAIMI/CheXagent-8b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "StanfordAIMI/CheXagent-8b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use StanfordAIMI/CheXagent-8b with Docker Model Runner:
docker model run hf.co/StanfordAIMI/CheXagent-8b
Commit History
-
Update generation_config.json
Verified signature4934e91
-
Add correct paper link (#1)
Verified signature- Add correct paper link (5d95b9c0189c08cb24838b39ead321e4ca53a83b) Co-authored-by: Omar Sanseviero <osanseviero@users.noreply.huggingface.co>1c1c4ba
-
Update README.md
Verified signature9a1af04
-
Update README.md
Verified signature4189203
-
Update README.md
4331d41 -
Update generation_config.json
d5bf817 -
Update generation_config.json
c3a0cfc
-
Update config.json
12c689d -
Update config.json
71fc32b -
Update preprocessor_config.json
c26ca02 -
Update preprocessor_config.json
c9cccc8 -
Update preprocessor_config.json
2adb202 -
Update preprocessor_config.json
3acd256 -
Upload 3 files
b09211c -
Update config.json
0f2d77c -
Upload CheXagentForConditionalGeneration
d564ab2 -
Upload processor
fd0deba -
initial commit
4dbb143