ModelHub XC a712e37da7 初始化项目,由ModelHub XC社区提供模型
Model: dominguesm/canarim-7b
Source: Original Platform
2026-05-31 20:48:04 +08:00

language, license, library_name, tags, datasets, inference, pipeline_tag, model-index
language license library_name tags datasets inference pipeline_tag model-index
pt
llama2 transformers
text-generation
pytorch
LLM
Portuguese
Llama 2
dominguesm/CC-MAIN-2023-23
false text-generation
name results
canarim-7b
task dataset metrics source
type name
text-generation Text Generation
name type config split args
AI2 Reasoning Challenge (25-Shot) ai2_arc ARC-Challenge test
num_few_shot
25
type value name
acc_norm 51.96 normalized accuracy
url name
https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=dominguesm/canarim-7b Open LLM Leaderboard
task dataset metrics source
type name
text-generation Text Generation
name type split args
HellaSwag (10-Shot) hellaswag validation
num_few_shot
10
type value name
acc_norm 77.52 normalized accuracy
url name
https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=dominguesm/canarim-7b Open LLM Leaderboard
task dataset metrics source
type name
text-generation Text Generation
name type config split args
MMLU (5-Shot) cais/mmlu all test
num_few_shot
5
type value name
acc 40.92 accuracy
url name
https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=dominguesm/canarim-7b Open LLM Leaderboard
task dataset metrics source
type name
text-generation Text Generation
name type config split args
TruthfulQA (0-shot) truthful_qa multiple_choice validation
num_few_shot
0
type value
mc2 40.03
url name
https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=dominguesm/canarim-7b Open LLM Leaderboard
task dataset metrics source
type name
text-generation Text Generation
name type config split args
Winogrande (5-shot) winogrande winogrande_xl validation
num_few_shot
5
type value name
acc 71.43 accuracy
url name
https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=dominguesm/canarim-7b Open LLM Leaderboard
task dataset metrics source
type name
text-generation Text Generation
name type config split args
GSM8k (5-shot) gsm8k main test
num_few_shot
5
type value name
acc 9.93 accuracy
url name
https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=dominguesm/canarim-7b Open LLM Leaderboard
task dataset metrics source
type name
text-generation Text Generation
name type config split args
ENEM (3-shot) enem_challenge main test
num_few_shot
3
type value name
acc 26.96 accuracy
url name
https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=dominguesm/canarim-7b Open PT LLM Leaderboard Evaluation Results
task dataset metrics source
type name
text-generation Text Generation
name type config split args
BLUEX (3-shot) bluex main test
num_few_shot
3
type value name
acc 29.76 accuracy
url name
https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=dominguesm/canarim-7b Open PT LLM Leaderboard Evaluation Results
task dataset metrics source
type name
text-generation Text Generation
name type config split args
OAB Exams (3-shot) oab_exams main test
num_few_shot
3
type value name
acc 31.48 accuracy
url name
https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=dominguesm/canarim-7b Open PT LLM Leaderboard Evaluation Results
task dataset metrics source
type name
text-generation Text Generation
name type config split args
ASSIN2 RTE (15-shot) assin2_rte main test
num_few_shot
15
type value name
acc 71.96 accuracy
url name
https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=dominguesm/canarim-7b Open PT LLM Leaderboard Evaluation Results
task dataset metrics source
type name
text-generation Text Generation
name type config split args
ASSIN2 STS (15-shot) assin2_sts main test
num_few_shot
15
type value name
acc 13.33 accuracy
url name
https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=dominguesm/canarim-7b Open PT LLM Leaderboard Evaluation Results
task dataset metrics source
type name
text-generation Text Generation
name type config split args
FAQUAD NLI (15-shot) faquad_nli main test
num_few_shot
15
type value name
acc 49.09 accuracy
url name
https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=dominguesm/canarim-7b Open PT LLM Leaderboard Evaluation Results
task dataset metrics source
type name
text-generation Text Generation
name type config split args
HateBR (25-shot) hatebr_offensive main test
num_few_shot
25
type value name
acc 78.48 accuracy
url name
https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=dominguesm/canarim-7b Open PT LLM Leaderboard Evaluation Results
task dataset metrics source
type name
text-generation Text Generation
name type config split args
PT Hate Speech (25-shot) portuguese_hate_speech main test
num_few_shot
25
type value name
acc 63.73 accuracy
url name
https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=dominguesm/canarim-7b Open PT LLM Leaderboard Evaluation Results
task dataset metrics source
type name
text-generation Text Generation
name type config split args
tweetSentBR (25-shot) tweetsentbr main test
num_few_shot
25
type value name
acc 62.38 accuracy
url name
https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=dominguesm/canarim-7b Open PT LLM Leaderboard Evaluation Results

Camarim Logo


Canarim-7B

Canarim-7B is a Portuguese large language model developed by Maicon Domingues.

Model description

The model was pretrained on 16 billion tokens from the Portuguese subset of CommonCrawl 2023-23, starting with the weights of LLaMA2-7B. The pretraining data has cutoff of mid-2023.

Key Features

  • Language: Specialized in understanding and generating Portuguese text, making it ideal for applications targeting Portuguese-speaking audiences.
  • Architecture: Inherits the robust architecture from LLaMA2-7B, ensuring efficient performance and accurate results.
  • Diverse Dataset: The pretraining dataset includes a wide range of topics and writing styles, enhancing the model's ability to understand various contexts and nuances in Portuguese.

Applications

Canarim-7B, was trained solely on a language modeling objective and has not been fine-tuned for instruction following. Therefore, it is more suited for few-shot tasks rather than zero-shot tasks. This means the model tends to perform better when provided with a few examples of the desired outcome during use. Here are some practical applications:

  • Natural Language Understanding (NLU): Efficient in tasks such as sentiment analysis, topic classification, and entity recognition in Portuguese text, especially when relevant examples are provided.
  • Natural Language Generation (NLG): Capable of generating coherent and contextually relevant text, useful for content creation, chatbots, and more, with improved results when provided examples of the desired style or format.
  • Language Translation: Suitable for high-quality translation between Portuguese and other languages, especially when examples of desired translations are included during model training or fine-tuning.

Tips for Efficient Use

  • Few-shot Learning: When using Canarim-7B for specific tasks, it is beneficial to provide a few relevant examples. This helps the model better understand the context and purpose of the task.
  • Contextualization: Including additional context in the input can significantly improve the quality of the models predictions and text generation.

Getting Started

To start using Canarim-7B with the Transformers library, first install the library if you haven't already:

pip install transformers

You can then load the model using the Transformers library. Here's a simple example of how to use the model for text generation using the pipeline function:

from transformers import AutoTokenizer, pipeline
import torch

model_id = "dominguesm/canarim-7b"
tokenizer = AutoTokenizer.from_pretrained(model_id)

pipe = pipeline(
    "text-generation",
    model=model_id,
    torch_dtype=torch.float16,
    device_map="auto",
)

prompt = make_prompt(question)
sequences = pipe(
   prompt,
   do_sample=True,
   num_return_sequences=1,
   eos_token_id=tokenizer.eos_token_id,
   max_length=2048,
   temperature=0.9,
   top_p=0.6,
   repetition_penalty=1.15
)

This code snippet demonstrates how to generate text with Canarim-7B. You can customize the input text and adjust parameters like max_length according to your requirements.

How to Cite

If you want to cite Canarim-7B, you could use this:

@misc {maicon_domingues_2023,
	author       = { {Maicon Domingues} },
	title        = { canarim-7b (Revision 08fdd2b) },
	year         = 2023,
	url          = { https://huggingface.co/dominguesm/canarim-7b },
	doi          = { 10.57967/hf/1356 },
	publisher    = { Hugging Face }
}

Citations

@misc{touvron2023llama,
      title={Llama 2: Open Foundation and Fine-Tuned Chat Models},
      author={Hugo Touvron and Louis Martin and Kevin Stone and Peter Albert and Amjad Almahairi and Yasmine Babaei and Nikolay Bashlykov and Soumya Batra and Prajjwal Bhargava and Shruti Bhosale and Dan Bikel and Lukas Blecher and Cristian Canton Ferrer and Moya Chen and Guillem Cucurull and David Esiobu and Jude Fernandes and Jeremy Fu and Wenyin Fu and Brian Fuller and Cynthia Gao and Vedanuj Goswami and Naman Goyal and Anthony Hartshorn and Saghar Hosseini and Rui Hou and Hakan Inan and Marcin Kardas and Viktor Kerkez and Madian Khabsa and Isabel Kloumann and Artem Korenev and Punit Singh Koura and Marie-Anne Lachaux and Thibaut Lavril and Jenya Lee and Diana Liskovich and Yinghai Lu and Yuning Mao and Xavier Martinet and Todor Mihaylov and Pushkar Mishra and Igor Molybog and Yixin Nie and Andrew Poulton and Jeremy Reizenstein and Rashi Rungta and Kalyan Saladi and Alan Schelten and Ruan Silva and Eric Michael Smith and Ranjan Subramanian and Xiaoqing Ellen Tan and Binh Tang and Ross Taylor and Adina Williams and Jian Xiang Kuan and Puxin Xu and Zheng Yan and Iliyan Zarov and Yuchen Zhang and Angela Fan and Melanie Kambadur and Sharan Narang and Aurelien Rodriguez and Robert Stojnic and Sergey Edunov and Thomas Scialom},
      year={2023},
      eprint={2307.09288},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}

License

Canarim-7B is released under the LLAMA 2 COMMUNITY LICENSE AGREEMENT.

Open PT LLM Leaderboard Evaluation Results

Detailed results can be found here

Metric Value
Avg. 47.36
ENEM (3-Shot) 25.96
BLUEX (3-Shot) 29.76
OAB Exams (3-Shot) 31.48
ASSIN2 RTE (15-shot) 71.96
ASSIN2 STS (15-shot) 13.33
FAQUAD NLI (15-shot) 49.09
HateBR (25-shot) 78.48
PT Hate Speech (25-shot) 63.73
tweetSentBR (25-shot) 62.38

Open LLM Leaderboard Evaluation Results

Detailed results can be found here

Metric Value
Avg. 48.63
AI2 Reasoning Challenge (25-Shot) 51.96
HellaSwag (10-Shot) 77.52
MMLU (5-Shot) 40.92
TruthfulQA (0-shot) 40.03
Winogrande (5-shot) 71.43
GSM8k (5-shot) 9.93
Description
Model synced from source: dominguesm/canarim-7b
Readme 851 KiB
Languages
Markdown 100%