projecte-aina / salamandra-7b-aligned-EADOP

huggingface.co
Total runs: 21
24-hour runs: -1
7-day runs: -8
30-day runs: -13
Model's Last Updated: October 23 2024
text-generation

Introduction of salamandra-7b-aligned-EADOP

Model Details of salamandra-7b-aligned-EADOP

Salamandra 7B aligned EADOP Model Card

Salamandra 7B aligned EADOP is a full-finetuning version of BSC Language Technologies Unit 's Salamandra Instruct 7B model of the Barcelona Supercomputing Center focused on improving the handling of out-of-domain Questions in a RAG instruction-following setting.

The model has been finetuned on a dataset consisting of 2,000+ human annotated in- and out-of-domain user messages and assistant responses in the context of a chatbot that can provide helpful information about the current Catalan legislation. The dataset alinia/EADOP-RAG-out-of-domain was collected in collaboration with the Entitat Autònoma del Diari Oficial i de Publicacions (EADOP) and it consists of user messages and assistant responses in Catalan and Spanish.

DISCLAIMER: This model is a proof-of-concept designed to demonstrate the effects of finetuning an Instruction model with a small dataset of out-of-domain questions in the model's capability to politely and informatively refuse to answer questions that are out-of-domain. As a proof-of-concept, the model is still prone to generate harmful or inappropriate content.


Model Details

Please refer to the Salamandra Instruct 7B model details for the specific details about the model architecture and pretraining.

Intended Use

This model was developed as a proof-of-concept to demonstrate the effects of finetuning an Instruction model with a small dataset of in- and out-of-domain questions in the model's capability to politely and informatively refuse to answer questions that are out-of-domain in the context of a domain-specific RAG-based chatbot.

How to use

This model uses the ChatML, the same instruction-following conversation format as the base model.

from datetime import datetime
from transformers import AutoTokenizer, AutoModelForCausalLM
import transformers
import torch

model_id = "projecte-aina/salamandra-7b-aligned-EADOP"

text = "Quina és la finalitat del Servei Meterològic de Catalunya ?"

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    device_map="auto",
    torch_dtype=torch.bfloat16
  )

message = [ { "role": "user", "content": text } ]

prompt = tokenizer.apply_chat_template(
    message,
    tokenize=False,
    add_generation_prompt=True
)

inputs = tokenizer.encode(prompt, add_special_tokens=False, return_tensors="pt")
outputs = model.generate(input_ids=inputs.to(model.device), max_new_tokens=200)

print(tokenizer.decode(outputs[0], skip_special_tokens=True))

Using this template, each turn is preceded by a <|im_start|> delimiter and the role of the entity (either user , for content supplied by the user, or assistant for LLM responses), and finished with the <|im_end|> token.


Finetuning Data

Please refer to alinia/EADOP-RAG-out-of-domain for the Dataset Card.

Author

This model has been finetuned by Alinia AI .

Contact

For further information, please email [email protected] .

Copyright

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

License

Apache-2.0

Funding

This work has been promoted and financed by the Generalitat de Catalunya through the Aina project.

Acknowledgements

This project is part of a partnership with the Language Technologies Unit at the Barcelona Supercomputing Center . The data collection process was supported by the Entitat Autònoma del Diari Oficial i de Publicacions (EADOP) .

Runs of projecte-aina salamandra-7b-aligned-EADOP on huggingface.co

21
Total runs
-1
24-hour runs
-5
3-day runs
-8
7-day runs
-13
30-day runs

More Information About salamandra-7b-aligned-EADOP huggingface.co Model

More salamandra-7b-aligned-EADOP license Visit here:

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

salamandra-7b-aligned-EADOP huggingface.co

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

salamandra-7b-aligned-EADOP huggingface.co Url

https://huggingface.co/projecte-aina/salamandra-7b-aligned-EADOP

projecte-aina salamandra-7b-aligned-EADOP online free

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

projecte-aina salamandra-7b-aligned-EADOP online free url in huggingface.co:

https://huggingface.co/projecte-aina/salamandra-7b-aligned-EADOP

salamandra-7b-aligned-EADOP install

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

salamandra-7b-aligned-EADOP install url in huggingface.co:

https://huggingface.co/projecte-aina/salamandra-7b-aligned-EADOP

Url of salamandra-7b-aligned-EADOP

salamandra-7b-aligned-EADOP huggingface.co Url

Provider of salamandra-7b-aligned-EADOP huggingface.co

projecte-aina
ORGANIZATIONS

Other API from projecte-aina