Text Generation
Transformers
Safetensors
t5
text2text-generation
icd
historical-demography
digital-humanities
multi-label
text-generation-inference
Instructions to use codllm/codllm-base-deploy with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use codllm/codllm-base-deploy with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="codllm/codllm-base-deploy")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("codllm/codllm-base-deploy") model = AutoModelForSeq2SeqLM.from_pretrained("codllm/codllm-base-deploy", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use codllm/codllm-base-deploy with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "codllm/codllm-base-deploy" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "codllm/codllm-base-deploy", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/codllm/codllm-base-deploy
- SGLang
How to use codllm/codllm-base-deploy 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 "codllm/codllm-base-deploy" \ --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": "codllm/codllm-base-deploy", "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 "codllm/codllm-base-deploy" \ --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": "codllm/codllm-base-deploy", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use codllm/codllm-base-deploy with Docker Model Runner:
docker model run hf.co/codllm/codllm-base-deploy
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -11,7 +11,6 @@ tags:
|
|
| 11 |
- icd
|
| 12 |
- historical-demography
|
| 13 |
- digital-humanities
|
| 14 |
-
pipeline_tag: text2text-generation
|
| 15 |
base_model: google/flan-t5-base
|
| 16 |
---
|
| 17 |
|
|
@@ -28,7 +27,7 @@ The model is highly sensitive to its input shape. Two formats were trained:
|
|
| 28 |
| format | example |
|
| 29 |
|---|---|
|
| 30 |
| `cod` | `tabes meseraica` |
|
| 31 |
-
| `cod_age_sex` | `cod: stuipen \| age: unknown \| sex: male` |
|
| 32 |
|
| 33 |
Rules that are easy to get wrong:
|
| 34 |
|
|
|
|
| 11 |
- icd
|
| 12 |
- historical-demography
|
| 13 |
- digital-humanities
|
|
|
|
| 14 |
base_model: google/flan-t5-base
|
| 15 |
---
|
| 16 |
|
|
|
|
| 27 |
| format | example |
|
| 28 |
|---|---|
|
| 29 |
| `cod` | `tabes meseraica` |
|
| 30 |
+
| `cod_age_sex` | `cod: stuipen \\| age: unknown \\| sex: male` |
|
| 31 |
|
| 32 |
Rules that are easy to get wrong:
|
| 33 |
|