Instructions to use basilepp19/bloom-1b7-evalita with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use basilepp19/bloom-1b7-evalita with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="basilepp19/bloom-1b7-evalita")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("basilepp19/bloom-1b7-evalita") model = AutoModelForCausalLM.from_pretrained("basilepp19/bloom-1b7-evalita") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use basilepp19/bloom-1b7-evalita with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "basilepp19/bloom-1b7-evalita" # 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-evalita", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/basilepp19/bloom-1b7-evalita
- SGLang
How to use basilepp19/bloom-1b7-evalita 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-evalita" \ --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-evalita", "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-evalita" \ --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-evalita", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use basilepp19/bloom-1b7-evalita with Docker Model Runner:
docker model run hf.co/basilepp19/bloom-1b7-evalita
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("basilepp19/bloom-1b7-evalita")
model = AutoModelForCausalLM.from_pretrained("basilepp19/bloom-1b7-evalita")Model Card for Model ID
This model is obtained by fine-tuning the BLOOM model over two Italian classification task prompts without language adaptation. To deal with this step, we decided to use data from two well-known EVALITA tasks: AMI2020 (misogyny detection) and HASPEEDE-v2-2020 (hate-speech detection).
Model Details
Model Description
The BLOOM model is directly fine-tuned over two Italian classification task prompts using two well-known EVALITA tasks: AMI2020 (misogyny detection) and HASPEEDE-v2-2020 (hate-speech detection).
We transformed the training data of the two tasks into an LLM prompt following a template. For the AMI task, we used the following template:
instruction: Nel testo seguente si esprime odio contro le donne? Rispondi sì o no., input: <text>, output: <sì/no>.
Similarly, for HASPEEDE we used:
instruction: “Il testo seguente incita all’odio? Rispondi sì o no., input: <text>, output: <sì/no>.
To fill these templates, we mapped the label "1" with the word "sì" and the label "0" with the word "no", <text> is just the sentence from the dataset to classify.
To fine-tune the model, we use the script available here: https://github.com/hyintell/BLOOM-fine-tuning/tree/main
- 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
- 4
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="basilepp19/bloom-1b7-evalita")