koelectra small v2 distilled korquad 384

Providermonologg
Categoryquestion-answering
LicenseApache-2.0
Downloads148.3K
Stars0

Overview

KoELECTRA-Small v2 is a lightweight, distilled transformer model optimized specifically for Korean language understanding. By utilizing a replaced token detection objective rather than traditional masked language modeling, it achieves high efficiency without sacrificing significant accuracy. This specific version is fine-tuned on the KorQuAD dataset, making it a specialized tool for extractive question-answering tasks. For developers, this model is an ideal choice for production environments where low latency and small memory footprints are critical, such as edge deployment or real-time chatbots. It integrates seamlessly with the Hugging Face Transformers library, providing a performant alternative to larger BERT-based models for Korean NLP pipelines.

Highlights

  • Optimized for extractive Korean question-answering tasks
  • Distilled architecture ensures low latency and small footprint
  • Fine-tuned on the comprehensive KorQuAD benchmark
  • Easy integration via Hugging Face Transformers library
  • Apache-2.0 license allows for flexible commercial use

Usage

Install
# Install Hugging Face transformers
pip install transformers torch
SDK Usage
# Load model with transformers
from transformers import AutoModel, AutoTokenizer

model = AutoModel.from_pretrained("monologg/koelectra-small-v2-distilled-korquad-384")
tokenizer = AutoTokenizer.from_pretrained("monologg/koelectra-small-v2-distilled-korquad-384")

Hugging Face Download

We recommend downloading the model via the Hugging Face CLI or Hub SDK.

Guidance:Before downloading, install huggingface_hub with:

Guidance
pip install -U huggingface_hub

CLI Download

Download the full repository

Download the full repository
huggingface-cli download monologg/koelectra-small-v2-distilled-korquad-384

Download a single file to a local folder (e.g. config.json into ./dir)

Download a single file to a local folder (e.g. config.json into ./dir)
huggingface-cli download monologg/koelectra-small-v2-distilled-korquad-384 config.json --local-dir ./dir

See the official docs for more CLI options

SDK Download

SDK Download
# 模型下载
from huggingface_hub import snapshot_download
model_dir = snapshot_download('monologg/koelectra-small-v2-distilled-korquad-384')

Git Download

Make sure git-lfs is installed first

Git Download
git lfs install
git clone https://huggingface.co/monologg/koelectra-small-v2-distilled-korquad-384

To skip LFS large-file downloads, use:

Skip LFS
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/monologg/koelectra-small-v2-distilled-korquad-384

Model files are hosted on the Hugging Face Hub — download directly via HF CLI / SDK / Git, not through this site.

PyTorch / Transformers Usage

Install Transformers

Install Transformers
pip install -U transformers torch

Load the model and run inference

Load the model and run inference
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained('monologg/koelectra-small-v2-distilled-korquad-384')
tokenizer = AutoTokenizer.from_pretrained('monologg/koelectra-small-v2-distilled-korquad-384')
Join our Telegram