Instructions to use raicrits/OpenLLama13b_Loquace_ITA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use raicrits/OpenLLama13b_Loquace_ITA with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="raicrits/OpenLLama13b_Loquace_ITA")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("raicrits/OpenLLama13b_Loquace_ITA", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use raicrits/OpenLLama13b_Loquace_ITA with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "raicrits/OpenLLama13b_Loquace_ITA" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "raicrits/OpenLLama13b_Loquace_ITA", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/raicrits/OpenLLama13b_Loquace_ITA
- SGLang
How to use raicrits/OpenLLama13b_Loquace_ITA 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 "raicrits/OpenLLama13b_Loquace_ITA" \ --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": "raicrits/OpenLLama13b_Loquace_ITA", "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 "raicrits/OpenLLama13b_Loquace_ITA" \ --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": "raicrits/OpenLLama13b_Loquace_ITA", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use raicrits/OpenLLama13b_Loquace_ITA with Docker Model Runner:
docker model run hf.co/raicrits/OpenLLama13b_Loquace_ITA
Commit ·
d0c39e4
1
Parent(s): f22b3d4
Update README.md
Browse files
README.md
CHANGED
|
@@ -9,31 +9,24 @@ language:
|
|
| 9 |
# Model Card for Model ID
|
| 10 |
|
| 11 |
<!-- Provide a quick summary of what the model is/does. -->
|
|
|
|
| 12 |
|
| 13 |
-
This modelcard aims to be a base template for new models. It has been generated using [this raw template](https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/templates/modelcard_template.md?plain=1).
|
| 14 |
-
|
| 15 |
-
## Model Details
|
| 16 |
|
| 17 |
### Model Description
|
| 18 |
|
| 19 |
-
|
|
|
|
|
|
|
| 20 |
|
|
|
|
| 21 |
|
| 22 |
|
| 23 |
-
- **Developed by:**
|
| 24 |
-
- **
|
| 25 |
-
- **
|
| 26 |
-
- **Language(s) (NLP):** [More Information Needed]
|
| 27 |
- **License:** [More Information Needed]
|
| 28 |
-
- **Finetuned from model
|
| 29 |
-
|
| 30 |
-
### Model Sources [optional]
|
| 31 |
|
| 32 |
-
<!-- Provide the basic links for the model. -->
|
| 33 |
-
|
| 34 |
-
- **Repository:** [More Information Needed]
|
| 35 |
-
- **Paper [optional]:** [More Information Needed]
|
| 36 |
-
- **Demo [optional]:** [More Information Needed]
|
| 37 |
|
| 38 |
## Uses
|
| 39 |
|
|
@@ -80,63 +73,40 @@ Use the code below to get started with the model.
|
|
| 80 |
### Training Data
|
| 81 |
|
| 82 |
<!-- This should link to a Data Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
|
|
|
| 83 |
|
| 84 |
-
[More Information Needed]
|
| 85 |
|
| 86 |
### Training Procedure
|
| 87 |
|
| 88 |
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
| 89 |
-
|
| 90 |
-
#### Preprocessing [optional]
|
| 91 |
-
|
| 92 |
-
[More Information Needed]
|
| 93 |
|
| 94 |
|
| 95 |
#### Training Hyperparameters
|
| 96 |
|
| 97 |
-
|
|
|
|
| 98 |
|
| 99 |
-
|
| 100 |
|
| 101 |
-
|
| 102 |
|
| 103 |
-
|
| 104 |
|
| 105 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
|
| 107 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 108 |
|
| 109 |
-
### Testing Data, Factors & Metrics
|
| 110 |
-
|
| 111 |
-
#### Testing Data
|
| 112 |
-
|
| 113 |
-
<!-- This should link to a Data Card if possible. -->
|
| 114 |
-
|
| 115 |
-
[More Information Needed]
|
| 116 |
-
|
| 117 |
-
#### Factors
|
| 118 |
-
|
| 119 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
| 120 |
-
|
| 121 |
-
[More Information Needed]
|
| 122 |
-
|
| 123 |
-
#### Metrics
|
| 124 |
-
|
| 125 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
| 126 |
-
|
| 127 |
-
[More Information Needed]
|
| 128 |
-
|
| 129 |
-
### Results
|
| 130 |
-
|
| 131 |
-
[More Information Needed]
|
| 132 |
-
|
| 133 |
-
#### Summary
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
## Model Examination [optional]
|
| 138 |
-
|
| 139 |
-
<!-- Relevant interpretability work for the model goes here -->
|
| 140 |
|
| 141 |
[More Information Needed]
|
| 142 |
|
|
@@ -146,11 +116,10 @@ Use the code below to get started with the model.
|
|
| 146 |
|
| 147 |
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
| 148 |
|
| 149 |
-
- **Hardware Type:**
|
| 150 |
-
- **Hours used:**
|
| 151 |
-
- **Cloud Provider:**
|
| 152 |
-
- **
|
| 153 |
-
- **Carbon Emitted:** [More Information Needed]
|
| 154 |
|
| 155 |
## Technical Specifications [optional]
|
| 156 |
|
|
@@ -194,8 +163,8 @@ Carbon emissions can be estimated using the [Machine Learning Impact calculator]
|
|
| 194 |
|
| 195 |
## Model Card Authors [optional]
|
| 196 |
|
| 197 |
-
|
| 198 |
|
| 199 |
## Model Card Contact
|
| 200 |
|
| 201 |
-
|
|
|
|
| 9 |
# Model Card for Model ID
|
| 10 |
|
| 11 |
<!-- Provide a quick summary of what the model is/does. -->
|
| 12 |
+
An open-source LLaMa language model of 13b parameters fine-tuned to follow instructions in italian.
|
| 13 |
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
### Model Description
|
| 16 |
|
| 17 |
+
This model is an open-source LLM of 13b parameters based on [OpenLLaMA](https://github.com/openlm-research/open_llama), an open-source replica of Meta AI's LLaMA.
|
| 18 |
+
The model was fine-tuned in order to follow instructions, as proposed in [Alpaca](https://github.com/tatsu-lab/stanford_alpaca),
|
| 19 |
+
but using [LoRA](https://arxiv.org/pdf/2106.09685.pdf) technique and a bigger dataset of instruction/answers in italian, [cosimoiaia/Loquace-102k](cosimoiaia/Loquace-102k).
|
| 20 |
|
| 21 |
+
This repository contains the model merged with the LoRA adapters obtained in the fine-tuning procedure.
|
| 22 |
|
| 23 |
|
| 24 |
+
- **Developed by:** Stefano Scotta (stefano.scotta@rai.it)
|
| 25 |
+
- **Model type:** LLM fine-tuned to follow instructions
|
| 26 |
+
- **Language(s) (NLP):** Italian
|
|
|
|
| 27 |
- **License:** [More Information Needed]
|
| 28 |
+
- **Finetuned from model:** [openlm-research/open_llama_13b](openlm-research/open_llama_13b)
|
|
|
|
|
|
|
| 29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
## Uses
|
| 32 |
|
|
|
|
| 73 |
### Training Data
|
| 74 |
|
| 75 |
<!-- This should link to a Data Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
| 76 |
+
The model was fine-tinuned on [cosimoiaia/Loquace-102k](cosimoiaia/Loquace-102k), a dataset of 102k question/answer pairs in italian.
|
| 77 |
|
|
|
|
| 78 |
|
| 79 |
### Training Procedure
|
| 80 |
|
| 81 |
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
| 82 |
+
The fine-tuning procedure was done using [LoRA](https://arxiv.org/pdf/2106.09685.pdf) approach following closely what done for fine-tuning models like [Alpaca-LoRA](https://github.com/tloen/alpaca-lora).
|
|
|
|
|
|
|
|
|
|
| 83 |
|
| 84 |
|
| 85 |
#### Training Hyperparameters
|
| 86 |
|
| 87 |
+
**Training setting:**
|
| 88 |
+
- train epochs=3,
|
| 89 |
|
| 90 |
+
- learning_rate=3e-4,
|
| 91 |
|
| 92 |
+
- optimizer="adamw_hf"
|
| 93 |
|
| 94 |
+
- mixed precision training: float16
|
| 95 |
|
| 96 |
+
**LoRA configuration:**
|
| 97 |
+
- r= 8
|
| 98 |
+
|
| 99 |
+
- lora_alpha=16
|
| 100 |
+
|
| 101 |
+
- target_modules=["q_proj","v_proj"]
|
| 102 |
|
| 103 |
+
- lora_dropout=0.05
|
| 104 |
+
|
| 105 |
+
- bias="none"
|
| 106 |
+
|
| 107 |
+
- task_type=TaskType.CAUSAL_LM
|
| 108 |
+
|
| 109 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 110 |
|
| 111 |
[More Information Needed]
|
| 112 |
|
|
|
|
| 116 |
|
| 117 |
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
| 118 |
|
| 119 |
+
- **Hardware Type:** 1 NVIDIA A100/40Gb
|
| 120 |
+
- **Hours used:** 68
|
| 121 |
+
- **Cloud Provider:** Private Infrastructure
|
| 122 |
+
- **Carbon Emitted:** 7.34 kg eq. CO2
|
|
|
|
| 123 |
|
| 124 |
## Technical Specifications [optional]
|
| 125 |
|
|
|
|
| 163 |
|
| 164 |
## Model Card Authors [optional]
|
| 165 |
|
| 166 |
+
Stefano Scotta (stefano.scotta@rai.it)
|
| 167 |
|
| 168 |
## Model Card Contact
|
| 169 |
|
| 170 |
+
stefano.scotta@rai.it
|