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, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- 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
add medical tag
#2
by davanstrien HF Staff - opened
README.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
<!-- markdownlint-disable first-line-h1 -->
|
| 2 |
<!-- markdownlint-disable html -->
|
| 3 |
|
|
@@ -58,4 +62,4 @@ response = processor.tokenizer.decode(output, skip_special_tokens=True)
|
|
| 58 |
url={https://arxiv.org/abs/2401.12208},
|
| 59 |
year={2024}
|
| 60 |
}
|
| 61 |
-
```
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- medical
|
| 4 |
+
---
|
| 5 |
<!-- markdownlint-disable first-line-h1 -->
|
| 6 |
<!-- markdownlint-disable html -->
|
| 7 |
|
|
|
|
| 62 |
url={https://arxiv.org/abs/2401.12208},
|
| 63 |
year={2024}
|
| 64 |
}
|
| 65 |
+
```
|