--- license: openrail datasets: - bertin-project/alpaca-spanish language: - es pipeline_tag: text-generation tags: - Transformers - bertin-project/alpaca-spanish - gptj - PyTorch - alpaca - llm spanish --- bertin-gpt-j-6B-alpaca-4bit-128g 馃 ![bertin](https://aeiljuispo.cloudimg.io/v7/https://s3.amazonaws.com/moonup/production/uploads/1627122830113-5ef3829e518622264685b0cd.png?w=200&h=200&f=face) **descripci贸n en espa帽ol agregado 猬囷笍** This is a 4-bit GPTQ version of the [bertin-project/bertin-gpt-j-6B-alpaca]( https://huggingface.co/bertin-project/bertin-gpt-j-6B-alpaca) this is the result of quantizing to 4 bits using [AutoGPTQ](https://github.com/PanQiWei/AutoGPTQ). **How to easily download and use this model in text-generation-webui** (tutorial by [TheBloke](https://huggingface.co/TheBloke)) TUTORIAL馃 Open [the text-generation-webui UI]( https://github.com/oobabooga/text-generation-webui) as normal. here is a tutorial how to install the text-generation-webui UI: [tutorial]( https://www.youtube.com/watch?v=lb_lC4XFedU&t). Click the Model tab. Under Download custom model or LoRA, enter RedXeol/bertin-gpt-j-6B-alpaca-4bit-128g. Click Download. Wait until it says it's finished downloading. Click the Refresh icon next to Model in the top left. In the Model drop-down: choose the model you just downloaded, bertin-gpt-j-6B-alpaca-4bit-128g. If you see an error in the bottom right, ignore it - it's temporary. Fill out the GPTQ parameters on the right: Bits = 4, Groupsize = 128, model_type = gptj Click Save settings for this model in the top right. Click Reload the Model in the top right. Once it says it's loaded, click the Text Generation tab and enter a prompt! **Model details** Data The dataset is a translation to Spanish of alpaca_data_cleaned.json (a clean version of the Alpaca dataset made at Stanford) using OpenAI's gpt-3.5-turbo model. We translated using a full-sample prompt instead of per strings, which resulted in more coherent tuples of (instruction, input, output) and costed around $60.0. This dataset cannot be used to create models that compete in any way with OpenAI. Finetuning To fine-tune the BERTIN GPT-J-6B model we used the code available on BERTIN's fork of mesh-transformer-jax, which provides code adapt an Alpaca dataset to finetune any GPT-J-6B model. We run finetuning for 3 epochs using sequence length of 2048 on a single TPUv3-8 for 3 hours on top of BERTIN GPT-J-6B. **you need an 8GB gpu to run it correctly.** **Espa帽ol** 馃嚜馃嚫 Esta es una versi贸n GPTQ de 4 bits del [bertin-project/bertin-gpt-j-6B-alpaca]( https://huggingface.co/bertin-project/bertin-gpt-j-6B-alpaca) Este es el resultado de cuantificar a 4 bits usando [AutoGPTQ](https://github.com/PanQiWei/AutoGPTQ). **C贸mo descargar y usar f谩cilmente este modelo en text-generation-webui** (tutorial de [TheBloke](https://huggingface.co/TheBloke)) TUTORIAL馃 Abra la interfaz de usuario [the text-generation-webui UI]( https://github.com/oobabooga/text-generation-webui) normal. aqu铆 hay un tutorial de c贸mo instalar la interfaz de usuario text-generation-webui: [tutorial]( https://www.youtube.com/watch?v=lb_lC4XFedU&t). Haga clic en la pesta帽a Modelo. En Descargar modelo personalizado o LoRA, ingrese RedXeol/bertin-gpt-j-6B-alpaca-4bit-128g. Haz clic en Descargar. Espera hasta que diga que ha terminado de descargarse. Haga clic en el icono Actualizar junto a Modelo en la parte superior izquierda. En el men煤 desplegable Modelo: elija el modelo que acaba de descargar, bertin-gpt-j-6B-alpaca-4bit-128g. Si ve un error en la parte inferior derecha, ign贸relo, es temporal. Complete los par谩metros GPTQ a la derecha: Bits = 4, Groupsize = 128, model_type = gptj Haz clic en Guardar configuraci贸n para este modelo en la parte superior derecha. Haga clic en Recargar el modelo en la parte superior derecha. Una vez que diga que est谩 cargado, haga clic en la pesta帽a Generaci贸n de texto e ingrese un mensaje. **Detalles del modelo** Datos El conjunto de datos es una traducci贸n al espa帽ol de alpaca_data_cleaned.json (una versi贸n limpia del conjunto de datos de Alpaca hecho en Stanford) utilizando el modelo gpt-3.5-turbo de OpenAI. Traducimos usando un indicador de muestra completa en lugar de por cadenas, lo que result贸 en tuplas m谩s coherentes de (instruction, input, output) y cost贸 alrededor de $ 60.0. Este conjunto de datos no se puede usar para crear modelos que compitan de alguna manera con OpenAI. Finetuning Para ajustar el modelo BERTIN GPT-J-6B, usamos el c贸digo disponible en la bifurcaci贸n de BERTIN de mesh-transformer-jax, que proporciona c贸digo para adaptar un conjunto de datos de Alpaca para ajustar cualquier modelo GPT-J-6B. Ejecutamos un ajuste fino para 3 茅pocas usando una longitud de secuencia de 2048 en un solo TPUv3-8 durante 3 horas sobre BERTIN GPT-J-6B. **necesitas una gpu de 8GB para ejecutarlo correctamente.** **puebas en nvidia rtx 3060 (12GB)** ![memoria gpu carga](https://pbs.twimg.com/media/Fv8jPPWXgAAbAAW?format=png&name=900x900) ![memoria gpu uso](https://pbs.twimg.com/media/Fv8jPPTXgAAPpMy?format=png&name=900x900) mira el hilo donde explico las pruebas totales: ![HILO](https://twitter.com/IdeVtuber/status/1659946141172072449)