Text Generation
Transformers
PyTorch
bloom
feature-extraction
Eval Results (legacy)
text-generation-inference
Instructions to use model-attribution-challenge/bloom-2b5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use model-attribution-challenge/bloom-2b5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="model-attribution-challenge/bloom-2b5")# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("model-attribution-challenge/bloom-2b5") model = AutoModel.from_pretrained("model-attribution-challenge/bloom-2b5", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use model-attribution-challenge/bloom-2b5 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "model-attribution-challenge/bloom-2b5" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "model-attribution-challenge/bloom-2b5", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/model-attribution-challenge/bloom-2b5
- SGLang
How to use model-attribution-challenge/bloom-2b5 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 "model-attribution-challenge/bloom-2b5" \ --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": "model-attribution-challenge/bloom-2b5", "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 "model-attribution-challenge/bloom-2b5" \ --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": "model-attribution-challenge/bloom-2b5", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use model-attribution-challenge/bloom-2b5 with Docker Model Runner:
docker model run hf.co/model-attribution-challenge/bloom-2b5
Commit ·
515ae96
1
Parent(s): 1c5992f
Update config.json (#9)
Browse files- Update config.json (c59381abbf01b42e86d2bd52c4410c329c2a09aa)
- config.json +0 -1
config.json
CHANGED
|
@@ -21,7 +21,6 @@
|
|
| 21 |
"num_attention_heads": 32,
|
| 22 |
"offset_alibi": 100,
|
| 23 |
"pretraining_tp": 4,
|
| 24 |
-
"seq_length": 2048,
|
| 25 |
"skip_bias_add": true,
|
| 26 |
"skip_bias_add_qkv": false,
|
| 27 |
"transformers_version": "4.20.0",
|
|
|
|
| 21 |
"num_attention_heads": 32,
|
| 22 |
"offset_alibi": 100,
|
| 23 |
"pretraining_tp": 4,
|
|
|
|
| 24 |
"skip_bias_add": true,
|
| 25 |
"skip_bias_add_qkv": false,
|
| 26 |
"transformers_version": "4.20.0",
|