Downloads · 30 days
23
4% of all-time downloads
projecte-aina/Flor1.3RAG
Flor1.3RAG is a text generation model from projecte-aina. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
<strong<span style="color:darkred"⚠️NOTICE⚠️: This model has been deprecated and is no longer actively maintained or supported. To access the latest models with enhanced features, better performance, and ongoing suppo…
Downloads · 30 days
23
4% of all-time downloads
All-time downloads
557
Public
Parameters
1.3B
2.6 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors2.6 GB · 100%
From the Hugging Face model README
<strong><span style="color:darkred">⚠️NOTICE⚠️: This model has been deprecated and is no longer actively maintained or supported. To access the latest models with enhanced features, better performance, and ongoing support, please visit <a style="color:darkred" href="https://huggingface.co/BSC-LT">https://huggingface.co/BSC-LT</a></span></strong>
Flor1.3RAG is a 6.3B-parameter transformer-based causal language model for Catalan, Spanish, and English, trained on 3 epochs on a customized QA dataset from various sources especifically to be used in RAG (Retrieval-Aumented Generation) Applications. The dataset used to fine tune the model is: PureInstructQA
The Flor1.3RAG model is ready-to-use for RAG applications optimized for Catalan language. It can perform text-generation Question Answering in the context of RAG applications. This model does not require a GPU to run.
import torch
from transformers import pipeline
pipe = pipeline("text-generation", model="projecte-aina/Flor1.3RAG")
instruction = "Quants habitants té Mataró?"
context = "Mataró és una ciutat de Catalunya, capital de la comarca del Maresme. Situada al litoral mediterrani, a uns 30 km al nord-est de Barcelona, ha estat tradicionalment un centre administratiu de rellevància territorial i un pol de dinamisme econòmic. Compta amb prop de 130.000 habitants, essent actualment la vuitena població del Principat i la tretzena dels Països Catalans. "
# We need to format the prompt and context using ### and \n
def givePrediction(instruction, context, max_new_tokens=50, repetition_penalty=1.2, top_k=50, top_p=0.95, do_sample=True, temperature=0.5):
text = f"### Instruction\n{{instruction}}\n### Context\n{{context}}\n### Answer\n"
response = pipe(text.format(instruction=instruction, context=context),temperature=temperature,repetition_penalty=repetition_penalty, max_new_tokens=max_new_tokens,top_k=top_k, top_p=top_p, do_sample=do_sample)[0]["generated_text"]
answer = response.split("###")[-1][8:-1]
return answer
answer = givePrediction(instruction, context)
print(answer)
'130 000'
At the time of submission, no measures have been taken to estimate the bias and toxicity embedded in the model. However, we are well aware that our models may be biased since the corpora have been collected using crawling techniques on multiple web sources. We intend to conduct research in these areas in the future, and if completed, this model card will be updated.
The training corpus is composed of 82,539 QA instruction following examples. See Data Card at PureInstructQA.
The Language Technologies Unit from Barcelona Supercomputing Center.
For further information, please send an email to langtech@bsc.es.
Copyright(c) 2023 by Language Technologies Unit, Barcelona Supercomputing Center.
This work was funded by [Departament de la Vicepresidència i de Polítiques Digitals i Territori de la Generalitat de Catalunya](https://politiquesdigitals.gencat.cat/ca/inici/index.html#googtrans(ca|en) within the framework of Projecte AINA.
The model published in this repository is intended for a generalist purpose and is available to third parties under a permissive Apache License, Version 2.0.
Be aware that the model may have biases and/or any other undesirable distortions.
When third parties deploy or provide systems and/or services to other parties using this model (or any system based on it) or become users of the model, they should note that it is their responsibility to mitigate the risks arising from its use and, in any event, to comply with applicable regulations, including regulations regarding the use of Artificial Intelligence.
In no event shall the owner and creator of the model (Barcelona Supercomputing Center) be liable for any results arising from the use made by third parties.
</details>