Downloads · 30 days
15
2% of all-time downloads
bbanany/qwen25-3b-korean-pii-qlora3
qwen25-3b-korean-pii-qlora3 is a text generation model from bbanany. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as other.
Qwen2.5-3B-Instruct를 한국어 RAG 응답의 candidate span이 자연인 정보에 해당하는지 PII 또는 NOTPII로 분류하도록 QLoRA 미세조정한 모델입니다.
Downloads · 30 days
15
2% of all-time downloads
All-time downloads
739
Public
Parameters
3.1B
6.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors6.3 GB · 100%
From the Hugging Face model README
Qwen2.5-3B-Instruct를 한국어 RAG 응답의 candidate span이 자연인 정보에
해당하는지 PII 또는 NOT_PII로 분류하도록 QLoRA 미세조정한 모델입니다.
Improved using Qwen.
저장소 루트의 가중치는 LoRA를 원본 모델에 병합한 FP16 safetensors입니다.
따라서 추론 시 bitsandbytes나 PEFT가 필요하지 않으며, 동일한 저장소를
NVIDIA CUDA와 Apple Silicon MPS에서 모두 불러올 수 있습니다. 학습된 LoRA
어댑터도 adapter/에 함께 보존합니다.
| Item | Value |
|---|---|
| Clean train records | 15,875 |
| Clean validation records | 1,984 |
| Clean test records | 1,983 |
| Test accuracy | 0.994453 |
| Test macro F1 | 0.994299 |
| Invalid generations | 0 |
| Evaluation date (UTC) | 2026-08-09 |
원본 23,000개 레코드를 합친 뒤 완전히 같은 레코드를 제거하고
(candidate tag, label) 기준으로 80/10/10 재분할했습니다. 정리된 세 분할
사이의 정확 일치 중복은 0건입니다. 상세 분포와 해시는
artifacts/dataset_report.json에 있습니다.
Qwen/Qwen2.5-3B-Instruct자세한 학습 설정은 artifacts/training_summary.json, 테스트 결과는
artifacts/test_metrics.json에 있습니다.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "bbanany/qwen25-3b-korean-pii-qlora3"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.float16,
device_map={"": 0},
).eval()
Apple Silicon과 MPS 지원 PyTorch가 필요합니다. 모델 전체가 통합 메모리에 올라가므로 16 GB 이상을 권장합니다.
import os
os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = "1"
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "bbanany/qwen25-3b-korean-pii-qlora3"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.float16,
device_map={"": "mps"},
).eval()
저장소에 포함된 inference.py를 사용하면 입력 검증, 채팅 템플릿 적용,
CUDA/MPS 자동 선택을 한 번에 처리할 수 있습니다.
python inference.py --model bbanany/qwen25-3b-korean-pii-qlora3 --input-json sample_input.json
입력 JSON 형식:
{
"answer": "관련 내용은 운영관리자 김민수의 확인을 거쳤습니다.",
"candidate": {
"text": "김민수",
"tag": "NAME",
"start": 13,
"end": 16
}
}
start와 end는 Python 문자열 슬라이스 기준이며
answer[start:end] == candidate.text여야 합니다.
PII와 NOT_PII 두 개뿐입니다.저장소의 라이선스는 파일 종류에 따라 다음과 같이 구분됩니다.
inference.py와 requirements-inference.txt는
MIT License로 제공합니다. 각 파일 상단의
SPDX-License-Identifier: MIT 표기를 확인하세요.Qwen/Qwen2.5-3B-Instruct의 파생물로서 Qwen Research License의
적용을 받습니다. 저장소의 LICENSE와 NOTICE를 확인하세요. 해당
라이선스는 원칙적으로 비상업적 연구·평가 용도에 대한 권리를 부여하며,
상업적 이용에는 원 라이선스 제공자의 별도 허가가 필요할 수 있습니다.즉, 코드 파일에 적용되는 MIT License가 모델 가중치의 Qwen Research License를 변경하거나 대체하지 않습니다.
Qwen is licensed under the Qwen RESEARCH LICENSE AGREEMENT, Copyright (c) Alibaba Cloud. All Rights Reserved.
학습 JSONL 원문은 모델 저장소에 포함하지 않습니다. 모델 출력에 실제 개인정보가 포함될 가능성을 고려하여 배포 환경에서 접근 통제와 로그 보존 정책을 별도로 적용하세요.