Instructions to use cmarkea/bloomz-3b-sft-chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cmarkea/bloomz-3b-sft-chat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="cmarkea/bloomz-3b-sft-chat")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("cmarkea/bloomz-3b-sft-chat") model = AutoModelForCausalLM.from_pretrained("cmarkea/bloomz-3b-sft-chat", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cmarkea/bloomz-3b-sft-chat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cmarkea/bloomz-3b-sft-chat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cmarkea/bloomz-3b-sft-chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/cmarkea/bloomz-3b-sft-chat
- SGLang
How to use cmarkea/bloomz-3b-sft-chat 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 "cmarkea/bloomz-3b-sft-chat" \ --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": "cmarkea/bloomz-3b-sft-chat", "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 "cmarkea/bloomz-3b-sft-chat" \ --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": "cmarkea/bloomz-3b-sft-chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use cmarkea/bloomz-3b-sft-chat with Docker Model Runner:
docker model run hf.co/cmarkea/bloomz-3b-sft-chat
Maximum input length
Hello,
Thanks for publishing your models.
How can we determine the maximum input length of any model of your collections, esp. of Bloomz-Chat collection?
(At some point, I came across tokenizer's "model_max_length" but was surprised by the value: 1000000000000000019884624838656.)
Thanks
Hello JeromeL-DT,
Thank you for your interest in our modeling. Indeed, you will find this size limit on all models that have a relative positional encoder (as in the case of Bloom: Alibi). This is to indicate that in theory, there is no size limit. However, that's theory; in practice, we have been limited by the type of data (often chat type data has a relatively short format) and the architecture (GPU with 40 GB of VRAM). We observed a loss of modeling performance beyond a context of 5k tokens.