Text Generation
Transformers
Safetensors
English
llama
text-generation-inference
ruslanmv
trl
4-bit precision
bitsandbytes
Instructions to use ruslanmv/llama3-8B-medical with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ruslanmv/llama3-8B-medical with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ruslanmv/llama3-8B-medical")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ruslanmv/llama3-8B-medical") model = AutoModelForCausalLM.from_pretrained("ruslanmv/llama3-8B-medical") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ruslanmv/llama3-8B-medical with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ruslanmv/llama3-8B-medical" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ruslanmv/llama3-8B-medical", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ruslanmv/llama3-8B-medical
- SGLang
How to use ruslanmv/llama3-8B-medical 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 "ruslanmv/llama3-8B-medical" \ --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": "ruslanmv/llama3-8B-medical", "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 "ruslanmv/llama3-8B-medical" \ --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": "ruslanmv/llama3-8B-medical", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ruslanmv/llama3-8B-medical with Docker Model Runner:
docker model run hf.co/ruslanmv/llama3-8B-medical
Update README.md
Browse files
README.md
CHANGED
|
@@ -38,7 +38,10 @@ This repository provides a fine-tuned version of the powerful Llama3 8B model, s
|
|
| 38 |
This model is accessible through the Hugging Face Transformers library. Install it using pip:
|
| 39 |
|
| 40 |
```bash
|
| 41 |
-
pip install
|
|
|
|
|
|
|
|
|
|
| 42 |
```
|
| 43 |
|
| 44 |
**Usage Example**
|
|
|
|
| 38 |
This model is accessible through the Hugging Face Transformers library. Install it using pip:
|
| 39 |
|
| 40 |
```bash
|
| 41 |
+
pip install git+https://github.com/huggingface/accelerate.git
|
| 42 |
+
pip install git+https://github.com/huggingface/transformers.git
|
| 43 |
+
pip install bitsandbytes
|
| 44 |
+
|
| 45 |
```
|
| 46 |
|
| 47 |
**Usage Example**
|