Instructions to use minani/bloom with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use minani/bloom with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="minani/bloom")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("minani/bloom") model = AutoModelForCausalLM.from_pretrained("minani/bloom") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use minani/bloom with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "minani/bloom" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "minani/bloom", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/minani/bloom
- SGLang
How to use minani/bloom 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 "minani/bloom" \ --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": "minani/bloom", "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 "minani/bloom" \ --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": "minani/bloom", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use minani/bloom with Docker Model Runner:
docker model run hf.co/minani/bloom
Upload 3 files
Browse files- config.json +24 -0
- model_00071-of-00072.safetensors +3 -0
- pytorch_model_00071-of-00072.bin +3 -0
config.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"apply_residual_connection_post_layernorm": false,
|
| 3 |
+
"attention_dropout": 0.0,
|
| 4 |
+
"architectures": [
|
| 5 |
+
"BloomForCausalLM"
|
| 6 |
+
],
|
| 7 |
+
"attention_softmax_in_fp32": true,
|
| 8 |
+
"pad_token_id": 3,
|
| 9 |
+
"bos_token_id": 1,
|
| 10 |
+
"eos_token_id": 2,
|
| 11 |
+
"hidden_dropout": 0.0,
|
| 12 |
+
"initializer_range": 0.02,
|
| 13 |
+
"layer_norm_epsilon": 1e-05,
|
| 14 |
+
"masked_softmax_fusion": true,
|
| 15 |
+
"model_type": "bloom",
|
| 16 |
+
"n_embed": 14336,
|
| 17 |
+
"n_layer": 70,
|
| 18 |
+
"num_attention_heads": 112,
|
| 19 |
+
"pretraining_tp": 4,
|
| 20 |
+
"slow_but_exact": false,
|
| 21 |
+
"transformers_version": "4.21.0",
|
| 22 |
+
"use_cache": true,
|
| 23 |
+
"vocab_size": 250880
|
| 24 |
+
}
|
model_00071-of-00072.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:664c40c92e29491cd5fdd96c7f52a55fc0ba90c163f5be651584465de4c68a85
|
| 3 |
+
size 4932875557
|
pytorch_model_00071-of-00072.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2fb1a6018e6e0128477247f3a47de8dfc4571328307ed6600d2845bcd992b53c
|
| 3 |
+
size 4932877665
|