Instructions to use Sunbyeolsa/kogpt2-ko-onnx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use Sunbyeolsa/kogpt2-ko-onnx with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-generation', 'Sunbyeolsa/kogpt2-ko-onnx');
KoGPT2 (ONNX, int8) for Transformers.js
skt/kogpt2-base-v2๋ฅผ ๋ธ๋ผ์ฐ์ ์์ ์คํํ ์ ์๋๋ก ONNX๋ก ๋ณํํ๊ณ int8๋ก ์์ํํ ๋ฒ์ ์ ๋๋ค. AI ๋์๋ฆฌ ์์ ์ฉ ์ฌ์ดํธ LLM ํ์๋จธ์ ์์ "๊ณผ๊ฑฐ LLM" ์ฒดํ์ฉ์ผ๋ก ์ฌ์ฉํฉ๋๋ค.
์๋ณธ ๋ชจ๋ธ
- ๋ชจ๋ธ: SKํ
๋ ์ฝค KoGPT2 (
skt/kogpt2-base-v2) - ๋ผ์ด์ ์ค: CC BY-NC-SA 4.0 (๋น์์ ์ ์ด์ฉ, ๋์ผ ์กฐ๊ฑด ๋ณ๊ฒฝ ํ๋ฝ). ์ด ๋ณํ๋ณธ๋ ๊ฐ์ ๋ผ์ด์ ์ค๋ฅผ ๋ฐ๋ฆ ๋๋ค.
๋ณํ ๋ด์ฉ
- Optimum 1.23.3์ผ๋ก
text-generation-with-pastONNX ๋ด๋ณด๋ด๊ธฐ (opset 17) - onnxruntime 1.20.1 ๋์ ์์ํ (QUInt8, per-channel ๋) โ
onnx/model_quantized.onnx(์ฝ 126MB) - ์๋ณธ tokenizer_config์ ํน์ ํ ํฐ ์ ๋ณด๊ฐ ์์ด
bos/eos = </s>,unk = <unk>,pad = <pad>,mask = <mask>๋ก ์ง์ ์ง์ - ๋ณํ ์คํฌ๋ฆฝํธ: tools/convert_kogpt2.py
์ฌ์ฉ ์ (Transformers.js 3.x)
import { AutoTokenizer, AutoModelForCausalLM } from '@huggingface/transformers';
const tokenizer = await AutoTokenizer.from_pretrained('Sunbyeolsa/kogpt2-ko-onnx');
const model = await AutoModelForCausalLM.from_pretrained('Sunbyeolsa/kogpt2-ko-onnx', { dtype: 'q8', device: 'wasm' });
- Downloads last month
- 153
Model tree for Sunbyeolsa/kogpt2-ko-onnx
Base model
skt/kogpt2-base-v2