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)# 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
Update README.md
Browse files
README.md
CHANGED
|
@@ -54,8 +54,8 @@ response = processor.tokenizer.decode(output, skip_special_tokens=True)
|
|
| 54 |
@article{chexagent-2024,
|
| 55 |
title={CheXagent: Towards a Foundation Model for Chest X-Ray Interpretation},
|
| 56 |
author={Chen, Zhihong and Varma, Maya and Delbrouck, Jean-Benoit and Paschali, Magdalini and Blankemeier, Louis and Veen, Dave Van and Valanarasu, Jeya Maria Jose and Youssef, Alaa and Cohen, Joseph Paul and Reis, Eduardo Pontes and Tsai, Emily B. and Johnston, Andrew and Olsen, Cameron and Abraham, Tanishq Mathew and Gatidis, Sergios and Chaudhari, Akshay S and Langlotz, Curtis},
|
| 57 |
-
journal={arXiv preprint arXiv:
|
| 58 |
-
url={https://arxiv.org/abs/
|
| 59 |
year={2024}
|
| 60 |
}
|
| 61 |
```
|
|
|
|
| 54 |
@article{chexagent-2024,
|
| 55 |
title={CheXagent: Towards a Foundation Model for Chest X-Ray Interpretation},
|
| 56 |
author={Chen, Zhihong and Varma, Maya and Delbrouck, Jean-Benoit and Paschali, Magdalini and Blankemeier, Louis and Veen, Dave Van and Valanarasu, Jeya Maria Jose and Youssef, Alaa and Cohen, Joseph Paul and Reis, Eduardo Pontes and Tsai, Emily B. and Johnston, Andrew and Olsen, Cameron and Abraham, Tanishq Mathew and Gatidis, Sergios and Chaudhari, Akshay S and Langlotz, Curtis},
|
| 57 |
+
journal={arXiv preprint arXiv:2401.12208},
|
| 58 |
+
url={https://arxiv.org/abs/2401.12208},
|
| 59 |
year={2024}
|
| 60 |
}
|
| 61 |
```
|