mav23 / sabia-7b-GGUF

huggingface.co
Total runs: 148
24-hour runs: 0
7-day runs: -28
30-day runs: 25
Model's Last Updated: December 04 2024

Introduction of sabia-7b-GGUF

Model Details of sabia-7b-GGUF

Sabiá-7B is Portuguese language model developed by Maritaca AI .

Input: The model accepts only text input.

Output: The Model generates text only.

Model Architecture: Sabiá-7B is an auto-regressive language model that uses the same architecture of LLaMA-1-7B.

Tokenizer: It uses the same tokenizer as LLaMA-1-7B.

Maximum sequence length: 2048 tokens.

Pretraining data: The model was pretrained on 7 billion tokens from the Portuguese subset of ClueWeb22, starting with the weights of LLaMA-1-7B and further trained for an additional 10 billion tokens, approximately 1.4 epochs of the training dataset.

Data Freshness: The pretraining data has a cutoff of mid-2022.

License: The licensing is the same as LLaMA-1's, restricting the model's use to research purposes only.

Paper: For more details, please refer to our paper: Sabiá: Portuguese Large Language Models

Few-shot Example

Given that Sabiá-7B was trained solely on a language modeling objective without fine-tuning for instruction following, it is recommended for few-shot tasks rather than zero-shot tasks, like in the example below.

import torch
from transformers import LlamaTokenizer, LlamaForCausalLM

tokenizer = LlamaTokenizer.from_pretrained("maritaca-ai/sabia-7b")
model = LlamaForCausalLM.from_pretrained(
    "maritaca-ai/sabia-7b",
    device_map="auto",  # Automatically loads the model in the GPU, if there is one. Requires pip install acelerate
    low_cpu_mem_usage=True,
    torch_dtype=torch.bfloat16   # If your GPU does not support bfloat16, change to torch.float16
)  

prompt = """Classifique a resenha de filme como "positiva" ou "negativa".

Resenha: Gostei muito do filme, é o melhor do ano!
Classe: positiva

Resenha: O filme deixa muito a desejar.
Classe: negativa

Resenha: Apesar de longo, valeu o ingresso.
Classe:"""

input_ids = tokenizer(prompt, return_tensors="pt")

output = model.generate(
    input_ids["input_ids"].to("cuda"),
    max_length=1024,
    eos_token_id=tokenizer.encode("\n"))  # Stop generation when a "\n" token is dectected

# The output contains the input tokens, so we have to skip them.
output = output[0][len(input_ids["input_ids"][0]):]

print(tokenizer.decode(output, skip_special_tokens=True))

If your GPU does not have enough RAM, try using int8 precision. However, expect some degradation in the model output quality when compared to fp16 or bf16.

model = LlamaForCausalLM.from_pretrained(
    "maritaca-ai/sabia-7b",
    device_map="auto",
    low_cpu_mem_usage=True,
    load_in_8bit=True,  # Requires pip install bitsandbytes
)
Results in Portuguese

Below we show the results on the Poeta benchmark, which consists of 14 Portuguese datasets.

For more information on the Normalized Preferred Metric (NPM), please refer to our paper.

Model NPM
LLaMA-1-7B 33.0
LLaMA-2-7B 43.7
Sabiá-7B 48.5
Results in English

Below we show the average results on 6 English datasets: PIQA, HellaSwag, WinoGrande, ARC-e, ARC-c, and OpenBookQA.

Model NPM
LLaMA-1-7B 50.1
Sabiá-7B 49.0
Citation

Please use the following bibtex to cite our paper:

@InProceedings{10.1007/978-3-031-45392-2_15,
    author="Pires, Ramon
    and Abonizio, Hugo
    and Almeida, Thales Sales
    and Nogueira, Rodrigo",
    editor="Naldi, Murilo C.
    and Bianchi, Reinaldo A. C.",
    title="Sabi{\'a}: Portuguese Large Language Models",
    booktitle="Intelligent Systems",
    year="2023",
    publisher="Springer Nature Switzerland",
    address="Cham",
    pages="226--240",
    isbn="978-3-031-45392-2"
}

Open Portuguese LLM Leaderboard Evaluation Results

Detailed results can be found here

Metric Value
Average 47.09
ENEM Challenge (No Images) 55.07
BLUEX (No Images) 47.71
OAB Exams 41.41
Assin2 RTE 46.68
Assin2 STS 1.89
FaQuAD NLI 58.34
HateBR Binary 61.93
PT Hate Speech Binary 64.13
tweetSentBR 46.64

Runs of mav23 sabia-7b-GGUF on huggingface.co

148
Total runs
0
24-hour runs
-5
3-day runs
-28
7-day runs
25
30-day runs

More Information About sabia-7b-GGUF huggingface.co Model

sabia-7b-GGUF huggingface.co

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

sabia-7b-GGUF huggingface.co Url

https://huggingface.co/mav23/sabia-7b-GGUF

mav23 sabia-7b-GGUF online free

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

mav23 sabia-7b-GGUF online free url in huggingface.co:

https://huggingface.co/mav23/sabia-7b-GGUF

sabia-7b-GGUF install

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

sabia-7b-GGUF install url in huggingface.co:

https://huggingface.co/mav23/sabia-7b-GGUF

Url of sabia-7b-GGUF

sabia-7b-GGUF huggingface.co Url

Provider of sabia-7b-GGUF huggingface.co

mav23
ORGANIZATIONS

Other API from mav23

huggingface.co

Total runs: 1.2K
Run Growth: 509
Growth Rate: 41.42%
Updated:October 31 2024
huggingface.co

Total runs: 861
Run Growth: 546
Growth Rate: 63.41%
Updated:November 30 2024
huggingface.co

Total runs: 585
Run Growth: 570
Growth Rate: 97.44%
Updated:November 21 2024
huggingface.co

Total runs: 213
Run Growth: 149
Growth Rate: 69.95%
Updated:November 19 2024
huggingface.co

Total runs: 159
Run Growth: 127
Growth Rate: 79.87%
Updated:October 28 2024
huggingface.co

Total runs: 133
Run Growth: 36
Growth Rate: 27.07%
Updated:December 04 2024
huggingface.co

Total runs: 115
Run Growth: 18
Growth Rate: 15.65%
Updated:November 30 2024
huggingface.co

Total runs: 114
Run Growth: -3.5K
Growth Rate: -3107.02%
Updated:October 13 2024