Instructions to use dandanw/bloom-3b-sv with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dandanw/bloom-3b-sv with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dandanw/bloom-3b-sv")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("dandanw/bloom-3b-sv") model = AutoModelForCausalLM.from_pretrained("dandanw/bloom-3b-sv") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use dandanw/bloom-3b-sv with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dandanw/bloom-3b-sv" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dandanw/bloom-3b-sv", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/dandanw/bloom-3b-sv
- SGLang
How to use dandanw/bloom-3b-sv 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 "dandanw/bloom-3b-sv" \ --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": "dandanw/bloom-3b-sv", "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 "dandanw/bloom-3b-sv" \ --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": "dandanw/bloom-3b-sv", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use dandanw/bloom-3b-sv with Docker Model Runner:
docker model run hf.co/dandanw/bloom-3b-sv
Model Summary
This is a base causal model extended from bigscience/bloomz-3b.
- Model size: 3.02B (~20M more than the base model)
- The tokenizer is extended to support Swedish language. Additional 8068 of tokens trained from Swedish Wiki and OSCAR have been added. The embedding layer is therefore extended too.
- The embedding layer and self-attention query_key_value layers are re-trained on mixed English and Swedish corpuses.
Intended Use
This model is being created in order to enable using Swedish and English on LLMs to cover public research and business use cases. LLMs are intended to be used for language generation or as a pretrained base model. It needs to be further fine-tuned for specific tasks.
The model inherits bigscience-bloom-rail-1.0 license from the base model. It shall NOT be used in bad purposes. For use restrictions, please check out RAIL License, Use Restrictions Appendix A.
Training Corpuses:
The model is re-trained with ~800M Swedish tokens and ~260M English tokens.
Notes:
- Since the model is only re-trained with Swedish and English. It seems only Swedish and English capabilities are retained. If you want to re-enable the capabilities of other languages, you will need to re-train it with the specific language.
- You might notice the base model is bloomz-3b, which is a intruction fine-tuned version of bloom. After this re-train, it seems to lose the instruction capability as well. So it is now simply a base causal model which could speak Swedish.
- Downloads last month
- 9