denue-scian-qwen3-4b-lora - adapter for business name classification
2 min readupdated
This LoRA adapter, created by author samcaballero based on the Qwen/Qwen3-4B model, is designed to automatically classify Mexican company names into 6-digit SCIAN 2023 industry codes. The model was trained using QLoRA (QLoRA, a method for efficient fine-tuning of large language models with quantization) on data from the official DENUE catalog and is used for specialized text processing pipelines. It differs from the base version by strictly outputting only the 6-digit code without extra text. It is suitable for researchers testing automated business categorization methods.
Key features
- Based on the
Qwen/Qwen3-4Bmodel. - Trained on 187,350 records from the DENUE catalog (MX, 05/2026).
- Outputs strictly a 6-digit SCIAN 2023 code without additional text.
- Shows a test classification accuracy of 71.6%.
What you can do
- Integrate the adapter with the PEFT library to automate the processing of company name lists.
- Conduct research comparing classification quality with the TF-IDF method.
- Use as an example for creating similar LoRA setups for other classifiers.
Example
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
BASE = "Qwen/Qwen3-4B"
REVISION = "1cfa9a7208912126459214e8b04321603b3df60c"
ADAPTADOR = "samcaballero/denue-scian-qwen3-4b-lora"
tok = AutoTokenizer.from_pretrained(BASE, revision=REVISION)
modelo = AutoModelForCausalLM.from_pretrained(BASE, revision=REVISION, device_map="auto")
modelo = PeftModel.from_pretrained(modelo, ADAPTADOR)
Read more
DetailsTest accuracy: 71.6% (IC 95% 69.6-73.5)
Architecture: QLoRA rank 32, alpha 32
Limitations: not in production, experimental adapter










Comments