Downloads · 30 days
26
31% of all-time downloads
robsoncalixto/Llama-3.2-1B-finetuning-grp49
Llama-3.2-1B-finetuning-grp49 is a question answering model from robsoncalixto. Use it when the input is a question plus a passage. It is set up for transformers. The card lists the license as apache-2.0.
Este projeto foi desenvolvido pelo Grupo 49 como parte do Tech Challenge FIAP Pós-Tech fase 3:
Downloads · 30 days
26
31% of all-time downloads
All-time downloads
85
Public
Repo size
10.6 GB
Likes
0
Public
Click a slice to open those files.
.gguf1.3 GB · 100%
From the Hugging Face model README
Este projeto foi desenvolvido pelo Grupo 49 como parte do Tech Challenge FIAP Pós-Tech fase 3:
Objetivo de gerar descrições de produtos da Amazon. A metodologia aplicada foi utilizando a biblioteca Unsloth, uma biblioteca especializada no treinamento de LLMs, e um dataset composto por títulos e descrições de produtos da Amazon.
Este modelo pode ser facilmente executado com a biblioteca unsloth. Certifique-se de que você está usando um ambiente com GPU.
# Instale as dependências necessárias
!pip install "unsloth[colab-new] @ git+[https://github.com/unslothai/unsloth.git](https://github.com/unslothai/unsloth.git)"
!pip install --no-deps "xformers<0.0.26" "trl<0.9.0" "peft<0.12.0" "accelerate<0.32.0" "bitsandbytes<0.44.0"
from unsloth import FastLanguageModel
import torch
# Defina o dtype e a precisão de 4 bits
max_seq_length = 2048
dtype = None
load_in_4bit = True
# Carregue o modelo a partir do Hugging Face
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "robsoncalixto/Llama-3.2-1B-finetuning-grp49",
max_seq_length = max_seq_length,
dtype = dtype,
load_in_4bit = load_in_4bit,
)
FastLanguageModel.for_inference(model)
messages = [
{"role": "user", "content": "What do you know about something?"},
]
input_ids = tokenizer.apply_chat_template(messages, return_tensors = "pt").to("cuda")
outputs = model.generate(input_ids = input_ids, max_new_tokens = 64, use_cache = True)
decoded_output = tokenizer.batch_decode(outputs)
print(decoded_output[0])