Downloads · 30 days
5
16% of all-time downloads
alinefr/Qwen3-32B-Violencia-MG-2024
Qwen3-32B-Violencia-MG-2024 is a machine learning model from alinefr. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This model is a LoRA fine-tuned version of Qwen/Qwen3-32B using a real dataset about crime reports in Minas Gerais, Brazil, focusing on the "Estupro Consumado" category. It uses 4-bit quantization for efficient infere…
Downloads · 30 days
5
16% of all-time downloads
All-time downloads
32
Public
Parameters
33.2B
20.7 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors20.7 GB · 100%
How the weights are stored.
U831.2B · 94%
From the Hugging Face model README
This model is a LoRA fine-tuned version of Qwen/Qwen3-32B using a real dataset about crime reports in Minas Gerais, Brazil, focusing on the "Estupro Consumado" category. It uses 4-bit quantization for efficient inference and was trained using TRL's SFTTrainer.
This model can be used to:
registros) based on contextual features like city, month, year, and crime type.from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
import torch
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_compute_dtype=torch.bfloat16,
bnb_4bit_use_double_quant=False,
bnb_4bit_quant_type="nf4"
)
model_id = "YOUR_USERNAME/YOUR_MODEL_REPO" # replace with your model repo
tokenizer = AutoTokenizer.from_pretrained(model_id, use_fast=True)
model = AutoModelForCausalLM.from_pretrained(
model_id,
device_map="auto",
quantization_config=bnb_config,
trust_remote_code=True,
torch_dtype=torch.bfloat16
)
prompt = """Dados criminais de Minas Gerais:
- Município: AGUAS FORMOSAS
- Código do Município: 310090
- Mês: 1
- Ano: 2024
- RISP: 15
- Região Metropolitana de Belo Horizonte (RMBH): NÃO
- Natureza: Estupro Consumado
Quantos registros?
Resposta:"""
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=10)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))