Instructions to use EdBerg/bloom-560m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use EdBerg/bloom-560m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="EdBerg/bloom-560m")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("EdBerg/bloom-560m") model = AutoModelForCausalLM.from_pretrained("EdBerg/bloom-560m") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use EdBerg/bloom-560m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "EdBerg/bloom-560m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "EdBerg/bloom-560m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/EdBerg/bloom-560m
- SGLang
How to use EdBerg/bloom-560m 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 "EdBerg/bloom-560m" \ --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": "EdBerg/bloom-560m", "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 "EdBerg/bloom-560m" \ --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": "EdBerg/bloom-560m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use EdBerg/bloom-560m with Docker Model Runner:
docker model run hf.co/EdBerg/bloom-560m
Upload BloomForCausalLM
Browse files- config.json +32 -0
- generation_config.json +7 -0
- pytorch_model.bin +3 -0
config.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "bigscience/bloom-560m",
|
| 3 |
+
"apply_residual_connection_post_layernorm": false,
|
| 4 |
+
"architectures": [
|
| 5 |
+
"BloomForCausalLM"
|
| 6 |
+
],
|
| 7 |
+
"attention_dropout": 0.0,
|
| 8 |
+
"attention_softmax_in_fp32": true,
|
| 9 |
+
"bias_dropout_fusion": true,
|
| 10 |
+
"bos_token_id": 1,
|
| 11 |
+
"eos_token_id": 2,
|
| 12 |
+
"hidden_dropout": 0.0,
|
| 13 |
+
"hidden_size": 1024,
|
| 14 |
+
"initializer_range": 0.02,
|
| 15 |
+
"layer_norm_epsilon": 1e-05,
|
| 16 |
+
"masked_softmax_fusion": true,
|
| 17 |
+
"model_type": "bloom",
|
| 18 |
+
"n_head": 16,
|
| 19 |
+
"n_inner": null,
|
| 20 |
+
"n_layer": 24,
|
| 21 |
+
"offset_alibi": 100,
|
| 22 |
+
"pad_token_id": 3,
|
| 23 |
+
"pretraining_tp": 1,
|
| 24 |
+
"skip_bias_add": true,
|
| 25 |
+
"skip_bias_add_qkv": false,
|
| 26 |
+
"slow_but_exact": false,
|
| 27 |
+
"torch_dtype": "float16",
|
| 28 |
+
"transformers_version": "4.31.0",
|
| 29 |
+
"unk_token_id": 0,
|
| 30 |
+
"use_cache": true,
|
| 31 |
+
"vocab_size": 250880
|
| 32 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 1,
|
| 4 |
+
"eos_token_id": 2,
|
| 5 |
+
"pad_token_id": 3,
|
| 6 |
+
"transformers_version": "4.31.0"
|
| 7 |
+
}
|
pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8153005b17da68aadab92dc35ff061b1ee59728931e958f0e48e8f9c7d6f1265
|
| 3 |
+
size 1118528798
|