projecte-aina / FlorRAG

huggingface.co
Total runs: 0
24-hour runs: 0
7-day runs: 0
30-day runs: 0
Model's Last Updated: February 27 2025
text-generation

Introduction of FlorRAG

Model Details of FlorRAG

FLOR-6.3B Model optimized for Retrieval Augmented Generation

Table of Contents
Click to expand
Model description

FlorRAG is a 6.3B-parameter transformer-based causal language model for Catalan, Spanish, and English, trained 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: projecte-aina/RAG_Multilingual

Intended uses and limitations

The FlorRAG model is ready-to-use for RAG applications optimized for Catalan, English and Spanish languages. It can perform text-generation in the context of RAG applications.

How to use
import torch
from transformers import pipeline

pipe = pipeline("text-generation", model="projecte-aina/FlorRAG")

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)
'Mataró té una població de 130.000 habitants. Aquesta ciutat catalana, situada al litoral mediterrani, a uns 30 km al nord-est de Barcelona, ha estat històricament un important centre administratiu i un important pol de dinamisme econòmic.'
Limitations and bias

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.

Training
Instruction Data

The training corpus is composed of 56.406 RAG instruction following examples, created from extractive QA instances that were used as 'kernels of truth' to prompt a Mixture of expert model to generate more human-like and complete answers, based on a context. See Data Card at projecte-aina/RAG_Multilingual .

Additional information
Author

The Language Technologies Unit from Barcelona Supercomputing Center.

Contact

For further information, please send an email to [email protected] .

Copyright

Copyright(c) 2024 by Language Technologies Unit, Barcelona Supercomputing Center.

License

Apache License, Version 2.0

Funding

This work/research has been promoted and financed by the Government of Catalonia through the Aina project .

Disclaimer
Click to expand

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.

Runs of projecte-aina FlorRAG on huggingface.co

0
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs

More Information About FlorRAG huggingface.co Model

More FlorRAG license Visit here:

https://choosealicense.com/licenses/apache-2.0

FlorRAG huggingface.co

FlorRAG huggingface.co is an AI model on huggingface.co that provides FlorRAG's model effect (), which can be used instantly with this projecte-aina FlorRAG model. huggingface.co supports a free trial of the FlorRAG model, and also provides paid use of the FlorRAG. Support call FlorRAG model through api, including Node.js, Python, http.

projecte-aina FlorRAG online free

FlorRAG huggingface.co is an online trial and call api platform, which integrates FlorRAG's modeling effects, including api services, and provides a free online trial of FlorRAG, you can try FlorRAG online for free by clicking the link below.

projecte-aina FlorRAG online free url in huggingface.co:

https://huggingface.co/projecte-aina/FlorRAG

FlorRAG install

FlorRAG is an open source model from GitHub that offers a free installation service, and any user can find FlorRAG on GitHub to install. At the same time, huggingface.co provides the effect of FlorRAG install, users can directly use FlorRAG installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

FlorRAG install url in huggingface.co:

https://huggingface.co/projecte-aina/FlorRAG

Url of FlorRAG

Provider of FlorRAG huggingface.co

projecte-aina
ORGANIZATIONS

Other API from projecte-aina