Instructions to use basilepp19/bloom-1b7_it with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use basilepp19/bloom-1b7_it with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="basilepp19/bloom-1b7_it")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("basilepp19/bloom-1b7_it") model = AutoModelForCausalLM.from_pretrained("basilepp19/bloom-1b7_it") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use basilepp19/bloom-1b7_it with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "basilepp19/bloom-1b7_it" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "basilepp19/bloom-1b7_it", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/basilepp19/bloom-1b7_it
- SGLang
How to use basilepp19/bloom-1b7_it 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 "basilepp19/bloom-1b7_it" \ --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": "basilepp19/bloom-1b7_it", "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 "basilepp19/bloom-1b7_it" \ --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": "basilepp19/bloom-1b7_it", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use basilepp19/bloom-1b7_it with Docker Model Runner:
docker model run hf.co/basilepp19/bloom-1b7_it
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("basilepp19/bloom-1b7_it")
model = AutoModelForCausalLM.from_pretrained("basilepp19/bloom-1b7_it")Model Card for Model ID
This model is obtained by adapting bloom-1b7 to the Italian language. Among the languages supported by the BLOOM model, there is no Italian, making its use in that context challenging. We adapt the original BLOOM model using the MAD-X language adaptation strategy.
Model Details
Model Description
We adapt the bloom-1b7 to the Italian language using the MAD-X language adaptation strategy. To produce a valuable model, we follow the same procedure proposed in: https://arxiv.org/abs/2212.09535
We use default script parameters and select a sample of 100,000 examples in the Italian language. We decided to sample data from the Filtered Oscar Dataset for the Italian Language released by Sarti.
It is important to underline that when you use the adapted LLM is necessary to use the tokenizer of the adapted model.
- Developed by: Pierpaolo Basile, Pierluigi Cassotti, Marco Polignano, Lucia Siciliani, Giovanni Semeraro. Department of Computer Science, University of Bari Aldo Moro, Italy
- Model type: BLOOM
- Language(s) (NLP): Italian
- License: BigScience BLOOM RAIL 1.0
Citation
Pierpaolo Basile, Pierluigi Cassotti, Marco Polignano, Lucia Siciliani, Giovanni Semeraro. On the impact of Language Adaptation for Large Language Models: A case study for the Italian language using only open resources. Proceedings of the Ninth Italian Conference on Computational Linguistics (CLiC-it 2023).
- Downloads last month
- 821
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="basilepp19/bloom-1b7_it")