GraySoft
Projects Models About FAQ Contact Download guIDE →
Model Intelligence Sheet

richarderkhov/rhaymison_-_llama-3-portuguese-tom-cat-8b-instruct-gguf overview

If you are looking for enhanced compatibility, the Luana model also has a GGUF family that can be run with LlamaCpp. You can explore the GGUF models starting with the one below: Explore this and other models to find the best fit for your needs! This model was trained with a superset of 300,000 chat in Portuguese. The model comes to help fill the gap in models in Portuguese. Tuned from the Llama3 8B, the model was adjusted mainly for chat. # How to use ### FULL MODEL : A100 ### HALF MODEL: L4 ### 8bit or 4bit : T4 or V100 You can use the model in its normal form up to 4-bit quantization. Below we will use both approaches. Remember that verbs are important in your prompt. Tell your model how to act or behave so that you can guide them along the path of their response. Important points like these help models (even smaller models like 8b) to perform much better. You can use with Pipeline. If you are having a memory problem such as "CUDA Out of memory", you should use 4-bit or 8-bit quantization. For the complete model in colab you will need the A100. If you want to use 4bits or 8bits, T4 or L4 will already solve the problem. # 4bits example # Open Portuguese LLM Leaderboard Evaluation Results Detailed results can be found here and on the 🚀 Open Portuguese LLM Leaderboard | Metric | Value | |--------------------------|---------| |Average |70.57| |ENEM Challenge (No Images)| 70.40| |BLUEX (No Images) | 58| |OAB Exams | 51.07| |Assin2 RTE | 90.91| |Assin2 STS | 75.40| |FaQuAD NLI | 76.05| |HateBR Binary | 86.99| |PT Hate Speech Binary | 60.39| |tweetSentBR | 65.92| ### Comments Any idea, help or report will always be welcome. email: rhaymisoncristian@gmail.com

ggufendpoints_compatibleregion:usconversational
richarderkhov/rhaymison_-_llama-3-portuguese-tom-cat-8b-instruct-gguf visual
Downloads
104
Likes
0
Pipeline
Library
Visibility
Public
Access
Open

Repository Files & Downloads

22 files detected
Direct downloads for all repository files
FileTypeQuantizationSizeLink
Llama-3-portuguese-Tom-cat-8b-instruct.IQ3_M.gguf GGUF IQ3_M 3.52 GB Download
Llama-3-portuguese-Tom-cat-8b-instruct.IQ3_S.gguf GGUF IQ3_S 3.43 GB Download
Llama-3-portuguese-Tom-cat-8b-instruct.IQ3_XS.gguf GGUF IQ3_XS 3.28 GB Download
Llama-3-portuguese-Tom-cat-8b-instruct.IQ4_NL.gguf GGUF IQ4_NL 4.38 GB Download
Llama-3-portuguese-Tom-cat-8b-instruct.IQ4_XS.gguf GGUF IQ4_XS 4.18 GB Download
Llama-3-portuguese-Tom-cat-8b-instruct.Q2_K.gguf GGUF Q2_K 2.96 GB Download
Llama-3-portuguese-Tom-cat-8b-instruct.Q3_K.gguf GGUF Q3_K 3.74 GB Download
Llama-3-portuguese-Tom-cat-8b-instruct.Q3_K_L.gguf GGUF Q3_K_L 4.03 GB Download
Llama-3-portuguese-Tom-cat-8b-instruct.Q3_K_M.gguf GGUF Q3_K_M 3.74 GB Download
Llama-3-portuguese-Tom-cat-8b-instruct.Q3_K_S.gguf GGUF Q3_K_S 3.41 GB Download
Llama-3-portuguese-Tom-cat-8b-instruct.Q4_0.gguf GGUF 4.34 GB Download
Llama-3-portuguese-Tom-cat-8b-instruct.Q4_1.gguf GGUF 4.78 GB Download
Llama-3-portuguese-Tom-cat-8b-instruct.Q4_K.gguf GGUF Q4_K 4.58 GB Download
Llama-3-portuguese-Tom-cat-8b-instruct.Q4_K_M.gguf GGUF Q4_K_M 4.58 GB Download
Llama-3-portuguese-Tom-cat-8b-instruct.Q4_K_S.gguf GGUF Q4_K_S 4.37 GB Download
Llama-3-portuguese-Tom-cat-8b-instruct.Q5_0.gguf GGUF 5.21 GB Download
Llama-3-portuguese-Tom-cat-8b-instruct.Q5_1.gguf GGUF 5.65 GB Download
Llama-3-portuguese-Tom-cat-8b-instruct.Q5_K.gguf GGUF Q5_K 5.34 GB Download
Llama-3-portuguese-Tom-cat-8b-instruct.Q5_K_M.gguf GGUF Q5_K_M 5.34 GB Download
Llama-3-portuguese-Tom-cat-8b-instruct.Q5_K_S.gguf GGUF Q5_K_S 5.21 GB Download
Llama-3-portuguese-Tom-cat-8b-instruct.Q6_K.gguf GGUF Q6_K 6.14 GB Download
Llama-3-portuguese-Tom-cat-8b-instruct.Q8_0.gguf GGUF 7.95 GB Download

Model Details Live

Model Slug
richarderkhov/rhaymison_-_llama-3-portuguese-tom-cat-8b-instruct-gguf
Author
RichardErkhov
Pipeline Task
Library
Created
2024-08-20
Last Modified
2024-08-20
Gated
No
Private
No
HF SHA
094cdea1ec872bf2047a2e31c6a9933aa76f1137
License
Unknown
Language
Unknown
Base Model
Unknown

Metadata Inspector

Normalized metadata (stored in metadata_json)
{
  "metadata": {},
  "card_data": {
    "frontmatter": {},
    "hero_image_url": "https://raw.githubusercontent.com/rhaymisonbetini/huggphotos/main/tom-cat-8b.webp",
    "summary": "If you are looking for enhanced compatibility, the Luana model also has a GGUF family that can be run with LlamaCpp. You can explore the GGUF models starting with the one below: Explore this and other models to find the best fit for your needs! This model was trained with a superset of 300,000 chat in Portuguese. The model comes to help fill the gap in models in Portuguese. Tuned from the  Llama3 8B, the model was adjusted mainly for chat. # How to use ### FULL MODEL : A100 ### HALF MODEL: L4 ### 8bit or 4bit : T4 or V100 You can use the model in its normal form up to 4-bit quantization. Below we will use both approaches. Remember that verbs are important in your prompt. Tell your model how to act or behave so that you can guide them along the path of their response. Important points like these help models (even smaller models like 8b) to perform much better. ``python !pip install -q -U transformers !pip install -q -U accelerate !pip install -q -U bitsandbytes from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer model = AutoModelForCausalLM.from_pretrained(\"rhaymison/Llama-3-portuguese-Tom-cat-8b-instruct\", device_map= {\"\": 0}) tokenizer = AutoTokenizer.from_pretrained(\"rhaymison/Llama-3-portuguese-Tom-cat-8b-instruct\") model.eval() ` You can use with Pipeline. `python from transformers import pipeline pipe = pipeline(\"text-generation\", model=model, tokenizer=tokenizer, do_sample=True, max_new_tokens=512, num_beams=2, temperature=0.3, top_k=50, top_p=0.95, early_stopping=True, pad_token_id=tokenizer.eos_token_id, ) def format_prompt(question:str): system_prompt = \"Abaixo está uma instrução que descreve uma tarefa, juntamente com uma entrada que fornece mais contexto. Escreva uma resposta que complete adequadamente o pedido.\" return f\"\"\"system { system_prompt }user { question }assistant\"\"\" prompt =  format_prompt(\"Me fale sobra a OAB, Ordem dos Advogados do Brasil\") result = pipe(prompt) result[0][\"generated_text\"].split(\"assistant\")[1] #A Ordem dos Advogados do Brasil (OAB) é a entidade responsável por regulamentar e fiscalizar a profissão de advogado no Brasil. #Foi criada em 1930, com o objetivo de proteger os direitos e interesses dos advogados e da sociedade, garantindo a defesa dos direitos e garantias fundamentais. #A OAB é uma entidade de direito público, com personalidade jurídica própria, e é composta por advogados e advogadas que atuam em todo o território nacional. #A entidade é dirigida por um Conselho Federal, que é o órgão máximo da OAB, e é composto por 32 membros, eleitos por votação direta dos advogados e advogadas. #A OAB tem como principais atribuições:. Regulamentar a profissão de advogado: a OAB estabelece as normas e regulamentações para a formação, habilitação e exercício #a profissão de advogado no Brasil. Fiscalizar a atividade dos advogados: a OAB fiscaliza a atividade dos advogados, verificando se eles atendem às normas e #regulamentações estabelecidas.. Defender os direitos e interesses dos advogados: a OAB defende os direitos e interesses dos advogados, garantindo que eles #possam exercer sua profissão com liberdade e segurança.\\n4. Representar a sociedade: a OAB representa a sociedade, defendendo os direitos e interesses dos #dadãos e das instituições.A OAB também é responsável por: Certificar a formação e habilitação dos advogados; Fiscalizar a atividade dos advogados, verificando #se eles atendem às normas e regulamentações estabelecidas;\\n* Defender os direitos e interesses dos advogados, garantindo que eles possam exercer sua profissão #com liberdade e segurança; Representar a sociedade, defendendo os direitos e interesses dos cidadãos e das instituições.Além disso, a OAB também é responsável por: #Publicar o Diário da Ordem dos Advogados do Brasil ` `python prompt =  format_prompt(\"Haja como um professor de matemática e me explique porque 2 + 2 = 4\") result = pipe(prompt) result[0][\"generated_text\"].split(\"assistant\")[1] #Meu aluno, é um prazer explicar um conceito fundamental da matemática!  equação 2 + 2 = 4 pode parecer simples, mas é #importante entender por quê ela é verdadeira. Em matemática, a adição é uma operação que combina dois números para obter um resultado. #Nesse caso, estamos adicionando 2 e 2. Para entender melhor, vamos começar com um exemplo concreto. Imagine que você tem 2 maçãs em uma mesa e seu amigo também tem #2 maçãs em outra mesa. Se você e seu amigo combinam suas maçãs, você terá agora 4 maçãs.Agora, vamos usar símbolos para representar essa situação. #Podemos escrever 2 + 2 =?, e o resultado é 4. Isso significa que quando você soma 2 e 2, o resultado é 4. Mas por quê isso é verdade? Isso é porque a adição é #uma operação que segue certas regras. Uma dessas regras é que a ordem em que você soma os números não muda o resultado. Isso significa que 2 + 2 é igual a 2 + 2, #independentemente da ordem em que você soma.Além disso, a adição também é uma operação que é associativa, o que significa que você pode adicionar números em #qualquer ordem e o resultado será o mesmo. Por exemplo, (2 + 2) + 0 = 2 + (2 + 0). Isso é verdade porque a adição é uma operação que é idempotente, o que significa #que adicionando 0 a um número não muda o resultado.Portanto, quando você soma 2 e 2, o resultado é 4 porque a adição segue essas regras. A equação 2 + 2 = 4 #é verdadeira porque é uma consequência lógica da definição da adição e das regras que a governam.Espero que isso tenha ajudado a entender melhor por quê 2 + 2 = 4, #meu aluno! ` If you are having a memory problem such as \"CUDA Out of memory\", you should use 4-bit or 8-bit quantization. For the complete model in colab you will need the A100. If you want to use 4bits or 8bits, T4 or L4 will already solve the problem. # 4bits example `python from transformers import BitsAndBytesConfig import torch nb_4bit_config = BitsAndBytesConfig( load_in_4bit=True, bnb_4bit_quant_type=\"nf4\", bnb_4bit_compute_dtype=torch.bfloat16, bnb_4bit_use_double_quant=True ) model = AutoModelForCausalLM.from_pretrained( base_model, quantization_config=bnb_config, device_map={\"\": 0} ) `` # Open Portuguese LLM Leaderboard Evaluation Results Detailed results can be found here and on the 🚀 Open Portuguese LLM Leaderboard |          Metric          |  Value  | |--------------------------|---------| |Average                   |**70.57**| |ENEM Challenge (No Images)|    70.40| |BLUEX (No Images)         |       58| |OAB Exams                 |    51.07| |Assin2 RTE                |    90.91| |Assin2 STS                |    75.40| |FaQuAD NLI                |    76.05| |HateBR Binary             |    86.99| |PT Hate Speech Binary     |    60.39| |tweetSentBR               |    65.92| ### Comments Any idea, help or report will always be welcome. email: rhaymisoncristian@gmail.com",
    "quick_links": [],
    "benchmark_table_html": "",
    "readme_markdown": "Quantization made by Richard Erkhov.\n\n[Github](https://github.com/RichardErkhov)\n\n[Discord](https://discord.gg/pvy7H8DZMG)\n\n[Request more models](https://github.com/RichardErkhov/quant_request)\n\n\nLlama-3-portuguese-Tom-cat-8b-instruct - GGUF\n- Model creator: https://huggingface.co/rhaymison/\n- Original model: https://huggingface.co/rhaymison/Llama-3-portuguese-Tom-cat-8b-instruct/\n\n\n| Name | Quant method | Size |\n| ---- | ---- | ---- |\n| [Llama-3-portuguese-Tom-cat-8b-instruct.Q2_K.gguf](https://huggingface.co/RichardErkhov/rhaymison_-_Llama-3-portuguese-Tom-cat-8b-instruct-gguf/blob/main/Llama-3-portuguese-Tom-cat-8b-instruct.Q2_K.gguf) | Q2_K | 2.96GB |\n| [Llama-3-portuguese-Tom-cat-8b-instruct.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/rhaymison_-_Llama-3-portuguese-Tom-cat-8b-instruct-gguf/blob/main/Llama-3-portuguese-Tom-cat-8b-instruct.IQ3_XS.gguf) | IQ3_XS | 3.28GB |\n| [Llama-3-portuguese-Tom-cat-8b-instruct.IQ3_S.gguf](https://huggingface.co/RichardErkhov/rhaymison_-_Llama-3-portuguese-Tom-cat-8b-instruct-gguf/blob/main/Llama-3-portuguese-Tom-cat-8b-instruct.IQ3_S.gguf) | IQ3_S | 3.43GB |\n| [Llama-3-portuguese-Tom-cat-8b-instruct.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/rhaymison_-_Llama-3-portuguese-Tom-cat-8b-instruct-gguf/blob/main/Llama-3-portuguese-Tom-cat-8b-instruct.Q3_K_S.gguf) | Q3_K_S | 3.41GB |\n| [Llama-3-portuguese-Tom-cat-8b-instruct.IQ3_M.gguf](https://huggingface.co/RichardErkhov/rhaymison_-_Llama-3-portuguese-Tom-cat-8b-instruct-gguf/blob/main/Llama-3-portuguese-Tom-cat-8b-instruct.IQ3_M.gguf) | IQ3_M | 3.52GB |\n| [Llama-3-portuguese-Tom-cat-8b-instruct.Q3_K.gguf](https://huggingface.co/RichardErkhov/rhaymison_-_Llama-3-portuguese-Tom-cat-8b-instruct-gguf/blob/main/Llama-3-portuguese-Tom-cat-8b-instruct.Q3_K.gguf) | Q3_K | 3.74GB |\n| [Llama-3-portuguese-Tom-cat-8b-instruct.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/rhaymison_-_Llama-3-portuguese-Tom-cat-8b-instruct-gguf/blob/main/Llama-3-portuguese-Tom-cat-8b-instruct.Q3_K_M.gguf) | Q3_K_M | 3.74GB |\n| [Llama-3-portuguese-Tom-cat-8b-instruct.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/rhaymison_-_Llama-3-portuguese-Tom-cat-8b-instruct-gguf/blob/main/Llama-3-portuguese-Tom-cat-8b-instruct.Q3_K_L.gguf) | Q3_K_L | 4.03GB |\n| [Llama-3-portuguese-Tom-cat-8b-instruct.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/rhaymison_-_Llama-3-portuguese-Tom-cat-8b-instruct-gguf/blob/main/Llama-3-portuguese-Tom-cat-8b-instruct.IQ4_XS.gguf) | IQ4_XS | 4.18GB |\n| [Llama-3-portuguese-Tom-cat-8b-instruct.Q4_0.gguf](https://huggingface.co/RichardErkhov/rhaymison_-_Llama-3-portuguese-Tom-cat-8b-instruct-gguf/blob/main/Llama-3-portuguese-Tom-cat-8b-instruct.Q4_0.gguf) | Q4_0 | 4.34GB |\n| [Llama-3-portuguese-Tom-cat-8b-instruct.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/rhaymison_-_Llama-3-portuguese-Tom-cat-8b-instruct-gguf/blob/main/Llama-3-portuguese-Tom-cat-8b-instruct.IQ4_NL.gguf) | IQ4_NL | 4.38GB |\n| [Llama-3-portuguese-Tom-cat-8b-instruct.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/rhaymison_-_Llama-3-portuguese-Tom-cat-8b-instruct-gguf/blob/main/Llama-3-portuguese-Tom-cat-8b-instruct.Q4_K_S.gguf) | Q4_K_S | 4.37GB |\n| [Llama-3-portuguese-Tom-cat-8b-instruct.Q4_K.gguf](https://huggingface.co/RichardErkhov/rhaymison_-_Llama-3-portuguese-Tom-cat-8b-instruct-gguf/blob/main/Llama-3-portuguese-Tom-cat-8b-instruct.Q4_K.gguf) | Q4_K | 4.58GB |\n| [Llama-3-portuguese-Tom-cat-8b-instruct.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/rhaymison_-_Llama-3-portuguese-Tom-cat-8b-instruct-gguf/blob/main/Llama-3-portuguese-Tom-cat-8b-instruct.Q4_K_M.gguf) | Q4_K_M | 4.58GB |\n| [Llama-3-portuguese-Tom-cat-8b-instruct.Q4_1.gguf](https://huggingface.co/RichardErkhov/rhaymison_-_Llama-3-portuguese-Tom-cat-8b-instruct-gguf/blob/main/Llama-3-portuguese-Tom-cat-8b-instruct.Q4_1.gguf) | Q4_1 | 4.78GB |\n| [Llama-3-portuguese-Tom-cat-8b-instruct.Q5_0.gguf](https://huggingface.co/RichardErkhov/rhaymison_-_Llama-3-portuguese-Tom-cat-8b-instruct-gguf/blob/main/Llama-3-portuguese-Tom-cat-8b-instruct.Q5_0.gguf) | Q5_0 | 5.21GB |\n| [Llama-3-portuguese-Tom-cat-8b-instruct.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/rhaymison_-_Llama-3-portuguese-Tom-cat-8b-instruct-gguf/blob/main/Llama-3-portuguese-Tom-cat-8b-instruct.Q5_K_S.gguf) | Q5_K_S | 5.21GB |\n| [Llama-3-portuguese-Tom-cat-8b-instruct.Q5_K.gguf](https://huggingface.co/RichardErkhov/rhaymison_-_Llama-3-portuguese-Tom-cat-8b-instruct-gguf/blob/main/Llama-3-portuguese-Tom-cat-8b-instruct.Q5_K.gguf) | Q5_K | 5.34GB |\n| [Llama-3-portuguese-Tom-cat-8b-instruct.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/rhaymison_-_Llama-3-portuguese-Tom-cat-8b-instruct-gguf/blob/main/Llama-3-portuguese-Tom-cat-8b-instruct.Q5_K_M.gguf) | Q5_K_M | 5.34GB |\n| [Llama-3-portuguese-Tom-cat-8b-instruct.Q5_1.gguf](https://huggingface.co/RichardErkhov/rhaymison_-_Llama-3-portuguese-Tom-cat-8b-instruct-gguf/blob/main/Llama-3-portuguese-Tom-cat-8b-instruct.Q5_1.gguf) | Q5_1 | 5.65GB |\n| [Llama-3-portuguese-Tom-cat-8b-instruct.Q6_K.gguf](https://huggingface.co/RichardErkhov/rhaymison_-_Llama-3-portuguese-Tom-cat-8b-instruct-gguf/blob/main/Llama-3-portuguese-Tom-cat-8b-instruct.Q6_K.gguf) | Q6_K | 6.14GB |\n| [Llama-3-portuguese-Tom-cat-8b-instruct.Q8_0.gguf](https://huggingface.co/RichardErkhov/rhaymison_-_Llama-3-portuguese-Tom-cat-8b-instruct-gguf/blob/main/Llama-3-portuguese-Tom-cat-8b-instruct.Q8_0.gguf) | Q8_0 | 7.95GB |\n\n\n\n\nOriginal model description:\n---\nlanguage:\n- pt\nlicense: apache-2.0\nlibrary_name: transformers\ntags:\n- portugues\n- portuguese\n- QA\n- instruct\nbase_model: meta-llama/Meta-Llama-3-8B-Instruct\ndatasets:\n- rhaymison/superset\npipeline_tag: text-generation\nmodel-index:\n- name: Llama-3-portuguese-Tom-cat-8b-instruct\n  results:\n  - task:\n      type: text-generation\n      name: Text Generation\n    dataset:\n      name: ENEM Challenge (No Images)\n      type: eduagarcia/enem_challenge\n      split: train\n      args:\n        num_few_shot: 3\n    metrics:\n    - type: acc\n      value: 70.4\n      name: accuracy\n    source:\n      url: https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=rhaymison/Llama-3-portuguese-Tom-cat-8b-instruct\n      name: Open Portuguese LLM Leaderboard\n  - task:\n      type: text-generation\n      name: Text Generation\n    dataset:\n      name: BLUEX (No Images)\n      type: eduagarcia-temp/BLUEX_without_images\n      split: train\n      args:\n        num_few_shot: 3\n    metrics:\n    - type: acc\n      value: 58.0\n      name: accuracy\n    source:\n      url: https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=rhaymison/Llama-3-portuguese-Tom-cat-8b-instruct\n      name: Open Portuguese LLM Leaderboard\n  - task:\n      type: text-generation\n      name: Text Generation\n    dataset:\n      name: OAB Exams\n      type: eduagarcia/oab_exams\n      split: train\n      args:\n        num_few_shot: 3\n    metrics:\n    - type: acc\n      value: 51.07\n      name: accuracy\n    source:\n      url: https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=rhaymison/Llama-3-portuguese-Tom-cat-8b-instruct\n      name: Open Portuguese LLM Leaderboard\n  - task:\n      type: text-generation\n      name: Text Generation\n    dataset:\n      name: Assin2 RTE\n      type: assin2\n      split: test\n      args:\n        num_few_shot: 15\n    metrics:\n    - type: f1_macro\n      value: 90.91\n      name: f1-macro\n    source:\n      url: https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=rhaymison/Llama-3-portuguese-Tom-cat-8b-instruct\n      name: Open Portuguese LLM Leaderboard\n  - task:\n      type: text-generation\n      name: Text Generation\n    dataset:\n      name: Assin2 STS\n      type: eduagarcia/portuguese_benchmark\n      split: test\n      args:\n        num_few_shot: 15\n    metrics:\n    - type: pearson\n      value: 75.4\n      name: pearson\n    source:\n      url: https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=rhaymison/Llama-3-portuguese-Tom-cat-8b-instruct\n      name: Open Portuguese LLM Leaderboard\n  - task:\n      type: text-generation\n      name: Text Generation\n    dataset:\n      name: FaQuAD NLI\n      type: ruanchaves/faquad-nli\n      split: test\n      args:\n        num_few_shot: 15\n    metrics:\n    - type: f1_macro\n      value: 76.05\n      name: f1-macro\n    source:\n      url: https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=rhaymison/Llama-3-portuguese-Tom-cat-8b-instruct\n      name: Open Portuguese LLM Leaderboard\n  - task:\n      type: text-generation\n      name: Text Generation\n    dataset:\n      name: HateBR Binary\n      type: ruanchaves/hatebr\n      split: test\n      args:\n        num_few_shot: 25\n    metrics:\n    - type: f1_macro\n      value: 86.99\n      name: f1-macro\n    source:\n      url: https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=rhaymison/Llama-3-portuguese-Tom-cat-8b-instruct\n      name: Open Portuguese LLM Leaderboard\n  - task:\n      type: text-generation\n      name: Text Generation\n    dataset:\n      name: PT Hate Speech Binary\n      type: hate_speech_portuguese\n      split: test\n      args:\n        num_few_shot: 25\n    metrics:\n    - type: f1_macro\n      value: 60.39\n      name: f1-macro\n    source:\n      url: https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=rhaymison/Llama-3-portuguese-Tom-cat-8b-instruct\n      name: Open Portuguese LLM Leaderboard\n  - task:\n      type: text-generation\n      name: Text Generation\n    dataset:\n      name: tweetSentBR\n      type: eduagarcia/tweetsentbr_fewshot\n      split: test\n      args:\n        num_few_shot: 25\n    metrics:\n    - type: f1_macro\n      value: 65.92\n      name: f1-macro\n    source:\n      url: https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard?query=rhaymison/Llama-3-portuguese-Tom-cat-8b-instruct\n      name: Open Portuguese LLM Leaderboard\n---\n\n# Llama-3-portuguese-Tom-cat-8b-instruct\n\n<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/rhaymisonbetini/huggphotos/main/tom-cat-8b.webp\"  width=\"50%\" style=\"margin-left:'auto' margin-right:'auto' display:'block'\"/>\n</p>\n\n\nIf you are looking for enhanced compatibility, the Luana model also has a GGUF family that can be run with LlamaCpp. \nYou can explore the GGUF models starting with the one below:\n\n- [Llama-3-portuguese-Tom-cat-8b-instruct-q8-gguf](https://huggingface.co/rhaymison/Llama-3-portuguese-Tom-cat-8b-instruct-q8-gguf)\n\nExplore this and other models to find the best fit for your needs!\n\n\nThis model was trained with a superset of 300,000 chat in Portuguese. \nThe model comes to help fill the gap in models in Portuguese. Tuned from the  Llama3 8B, the model was adjusted mainly for chat.\n\n# How to use\n\n### FULL MODEL : A100\n### HALF MODEL: L4\n### 8bit or 4bit : T4 or V100\n\nYou can use the model in its normal form up to 4-bit quantization. Below we will use both approaches.\nRemember that verbs are important in your prompt. Tell your model how to act or behave so that you can guide them along the path of their response. \nImportant points like these help models (even smaller models like 8b) to perform much better.\n\n```python\n!pip install -q -U transformers\n!pip install -q -U accelerate\n!pip install -q -U bitsandbytes\n\nfrom transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer\nmodel = AutoModelForCausalLM.from_pretrained(\"rhaymison/Llama-3-portuguese-Tom-cat-8b-instruct\", device_map= {\"\": 0})\ntokenizer = AutoTokenizer.from_pretrained(\"rhaymison/Llama-3-portuguese-Tom-cat-8b-instruct\")\nmodel.eval()\n\n```\n\nYou can use with Pipeline.\n```python\n\nfrom transformers import pipeline\npipe = pipeline(\"text-generation\",\n                model=model,\n                tokenizer=tokenizer,\n                do_sample=True,\n                max_new_tokens=512,\n                num_beams=2,\n                temperature=0.3,\n                top_k=50,\n                top_p=0.95,\n                early_stopping=True,\n                pad_token_id=tokenizer.eos_token_id,\n                )\n\n\ndef format_prompt(question:str):\n    system_prompt = \"Abaixo está uma instrução que descreve uma tarefa, juntamente com uma entrada que fornece mais contexto. Escreva uma resposta que complete adequadamente o pedido.\"\n\n    return f\"\"\"<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n    { system_prompt }<|eot_id|><|start_header_id|>user<|end_header_id|>\n    { question }<|eot_id|><|start_header_id|>assistant<|end_header_id|>\"\"\"\n\nprompt =  format_prompt(\"Me fale sobra a OAB, Ordem dos Advogados do Brasil\")\nresult = pipe(prompt)\nresult[0][\"generated_text\"].split(\"assistant<|end_header_id|>\")[1]\n\n\n\n#A Ordem dos Advogados do Brasil (OAB) é a entidade responsável por regulamentar e fiscalizar a profissão de advogado no Brasil.\n#Foi criada em 1930, com o objetivo de proteger os direitos e interesses dos advogados e da sociedade, garantindo a defesa dos direitos e garantias fundamentais.\n#A OAB é uma entidade de direito público, com personalidade jurídica própria, e é composta por advogados e advogadas que atuam em todo o território nacional.\n#A entidade é dirigida por um Conselho Federal, que é o órgão máximo da OAB, e é composto por 32 membros, eleitos por votação direta dos advogados e advogadas.\n#A OAB tem como principais atribuições:. Regulamentar a profissão de advogado: a OAB estabelece as normas e regulamentações para a formação, habilitação e exercício \n#a profissão de advogado no Brasil. Fiscalizar a atividade dos advogados: a OAB fiscaliza a atividade dos advogados, verificando se eles atendem às normas e\n#regulamentações estabelecidas.. Defender os direitos e interesses dos advogados: a OAB defende os direitos e interesses dos advogados, garantindo que eles\n#possam exercer sua profissão com liberdade e segurança.\\n4. Representar a sociedade: a OAB representa a sociedade, defendendo os direitos e interesses dos \n#dadãos e das instituições.A OAB também é responsável por: Certificar a formação e habilitação dos advogados; Fiscalizar a atividade dos advogados, verificando\n#se eles atendem às normas e regulamentações estabelecidas;\\n* Defender os direitos e interesses dos advogados, garantindo que eles possam exercer sua profissão\n#com liberdade e segurança; Representar a sociedade, defendendo os direitos e interesses dos cidadãos e das instituições.Além disso, a OAB também é responsável por:\n#Publicar o Diário da Ordem dos Advogados do Brasil\n\n```\n\n\n```python\nprompt =  format_prompt(\"Haja como um professor de matemática e me explique porque 2 + 2 = 4\")\nresult = pipe(prompt)\nresult[0][\"generated_text\"].split(\"assistant<|end_header_id|>\")[1]\n\n#Meu aluno, é um prazer explicar um conceito fundamental da matemática!  equação 2 + 2 = 4 pode parecer simples, mas é\n#importante entender por quê ela é verdadeira. Em matemática, a adição é uma operação que combina dois números para obter um resultado.\n#Nesse caso, estamos adicionando 2 e 2. Para entender melhor, vamos começar com um exemplo concreto. Imagine que você tem 2 maçãs em uma mesa e seu amigo também tem\n#2 maçãs em outra mesa. Se você e seu amigo combinam suas maçãs, você terá agora 4 maçãs.Agora, vamos usar símbolos para representar essa situação.\n#Podemos escrever 2 + 2 =?, e o resultado é 4. Isso significa que quando você soma 2 e 2, o resultado é 4. Mas por quê isso é verdade? Isso é porque a adição é\n#uma operação que segue certas regras. Uma dessas regras é que a ordem em que você soma os números não muda o resultado. Isso significa que 2 + 2 é igual a 2 + 2,\n#independentemente da ordem em que você soma.Além disso, a adição também é uma operação que é associativa, o que significa que você pode adicionar números em\n#qualquer ordem e o resultado será o mesmo. Por exemplo, (2 + 2) + 0 = 2 + (2 + 0). Isso é verdade porque a adição é uma operação que é idempotente, o que significa\n#que adicionando 0 a um número não muda o resultado.Portanto, quando você soma 2 e 2, o resultado é 4 porque a adição segue essas regras. A equação 2 + 2 = 4\n#é verdadeira porque é uma consequência lógica da definição da adição e das regras que a governam.Espero que isso tenha ajudado a entender melhor por quê 2 + 2 = 4,\n#meu aluno!\n\n```\n\n\nIf you are having a memory problem such as \"CUDA Out of memory\", you should use 4-bit or 8-bit quantization.\nFor the complete model in colab you will need the A100.\nIf you want to use 4bits or 8bits, T4 or L4 will already solve the problem.\n\n# 4bits example\n\n```python\nfrom transformers import BitsAndBytesConfig\nimport torch\nnb_4bit_config = BitsAndBytesConfig(\n    load_in_4bit=True,\n    bnb_4bit_quant_type=\"nf4\",\n    bnb_4bit_compute_dtype=torch.bfloat16,\n    bnb_4bit_use_double_quant=True\n)\n\nmodel = AutoModelForCausalLM.from_pretrained(\n    base_model,\n    quantization_config=bnb_config,\n    device_map={\"\": 0}\n)\n\n```\n\n# Open Portuguese LLM Leaderboard Evaluation Results  \n\nDetailed results can be found [here](https://huggingface.co/datasets/eduagarcia-temp/llm_pt_leaderboard_raw_results/tree/main/rhaymison/Llama-3-portuguese-Tom-cat-8b-instruct) and on the [🚀 Open Portuguese LLM Leaderboard](https://huggingface.co/spaces/eduagarcia/open_pt_llm_leaderboard)\n\n|          Metric          |  Value  |\n|--------------------------|---------|\n|Average                   |**70.57**|\n|ENEM Challenge (No Images)|    70.40|\n|BLUEX (No Images)         |       58|\n|OAB Exams                 |    51.07|\n|Assin2 RTE                |    90.91|\n|Assin2 STS                |    75.40|\n|FaQuAD NLI                |    76.05|\n|HateBR Binary             |    86.99|\n|PT Hate Speech Binary     |    60.39|\n|tweetSentBR               |    65.92|\n\n### Comments\n\nAny idea, help or report will always be welcome.\n\nemail: rhaymisoncristian@gmail.com\n\n <div style=\"display:flex; flex-direction:row; justify-content:left\">\n    <a href=\"https://www.linkedin.com/in/rhaymison-cristian-betini-2b3016175/\" target=\"_blank\">\n    <img src=\"https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white\">\n  </a>\n  <a href=\"https://github.com/rhaymisonbetini\" target=\"_blank\">\n    <img src=\"https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white\">\n  </a>\n </div>\n\n",
    "related_quantizations": []
  },
  "tags": [
    "gguf",
    "endpoints_compatible",
    "region:us",
    "conversational"
  ],
  "likes": 0,
  "downloads": 104,
  "gated": false,
  "private": false,
  "last_modified": "2024-08-20T02:02:16.000Z",
  "created_at": "2024-08-20T00:18:20.000Z",
  "pipeline_tag": "",
  "library_name": ""
}
Source payload excerpt (from Hugging Face API)
{
  "_id": "66c3e0cc85c8bcb5f25f1d69",
  "id": "RichardErkhov/rhaymison_-_Llama-3-portuguese-Tom-cat-8b-instruct-gguf",
  "modelId": "RichardErkhov/rhaymison_-_Llama-3-portuguese-Tom-cat-8b-instruct-gguf",
  "sha": "094cdea1ec872bf2047a2e31c6a9933aa76f1137",
  "createdAt": "2024-08-20T00:18:20.000Z",
  "lastModified": "2024-08-20T02:02:16.000Z",
  "author": "RichardErkhov",
  "downloads": 104,
  "likes": 0,
  "gated": false,
  "private": false,
  "pipeline_tag": "",
  "library_name": "",
  "siblings_count": 24
}