ํ์ต ์ฝ๋:
Sejong-Qwen-test-v1_inference.ipynb:
!pip install transformers einops accelerate
!pip install qwen
!pip install unsloth
from transformers import AutoTokenizer, AutoModelForCausalLM
# ํ ํฌ๋์ด์ ์ ๋ชจ๋ธ ๋ก๋
tokenizer = AutoTokenizer.from_pretrained(
"SejongKRX/Sejong-Qwen-v1",
trust_remote_code=True,
use_fast=False
)
model = AutoModelForCausalLM.from_pretrained(
"SejongKRX/Sejong-Qwen-v1",
trust_remote_code=True
)
# ์
๋ ฅ ํ
์คํธ
input_text = """
๋ค์ ์ค ํํ์ ์๊ฐ๊ฐ์น์ ๊ดํ ์ค๋ช
์ผ๋ก ์ณ์ง ์์ ๊ฒ์ ๋ฌด์์ธ๊ฐ?
A. ์ ๋ณต๋ฆฌ์ ๊ฒฝ์ฐ, ๋งค์ ์ ์ฉ๋๋ ์ด์์จ์ ์ฐ๊ฐ ๋ช
๋ชฉ ์ด์์จ์ 1/12๋ก ๋๋์ด ์ฐ์ถํ๋ค.
B. ํฌ์ ์๊ธ ๋ฐ ๊ธฐํ ์กฐ๊ฑด์ด ๋์ผํ ๊ฒฝ์ฐ, ๋จ๋ฆฌ ๋ฐฉ์๋ณด๋ค ๋ณต๋ฆฌ ๋ฐฉ์์์ ๋ฐ์ํ๋ ์ด์๊ฐ ๋ ํฌ๋ค.
C. ์ผ์๋ถ๋ก ์ง๊ธ๋ ๊ธ์ก์ ํ์ฌ ๊ฐ์น๋ ๋ฏธ๋ ๊ฐ์น๋ฅผ ์ผ์ ๊ธฐ๊ฐ ๋์ ํ ์ธ์จ์ ์ ์ฉํด ์ฐ์ถํ ์ ์๋ค.
D. 1,000,000์์ ์ฐ 5% ๋ณต๋ฆฌ๋ก 2๋
๋์ ์์นํ์ ๊ฒฝ์ฐ, ๋ง๊ธฐ์ ๋ฐ์ ์ธ์ ์ด์๋ 100,000์์ด๋ค.
### ์ ๋ต:
"""
inputs = tokenizer(input_text, return_tensors="pt")
# ๋ชจ๋ธ์ ์ฌ์ฉํ์ฌ ํ
์คํธ ์์ฑ
output = model.generate(**inputs, max_new_tokens=1500)
# ๊ฒฐ๊ณผ ๋์ฝ๋ฉ
generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
print(generated_text)
output:
๋ค์ ์ค ํํ์ ์๊ฐ๊ฐ์น์ ๊ดํ ์ค๋ช
์ผ๋ก ์ณ์ง ์์ ๊ฒ์ ๋ฌด์์ธ๊ฐ?
A. ์ ๋ณต๋ฆฌ์ ๊ฒฝ์ฐ, ๋งค์ ์ ์ฉ๋๋ ์ด์์จ์ ์ฐ๊ฐ ๋ช
๋ชฉ ์ด์์จ์ 1/12๋ก ๋๋์ด ์ฐ์ถํ๋ค.
B. ํฌ์ ์๊ธ ๋ฐ ๊ธฐํ ์กฐ๊ฑด์ด ๋์ผํ ๊ฒฝ์ฐ, ๋จ๋ฆฌ ๋ฐฉ์๋ณด๋ค ๋ณต๋ฆฌ ๋ฐฉ์์์ ๋ฐ์ํ๋ ์ด์๊ฐ ๋ ํฌ๋ค.
C. ์ผ์๋ถ๋ก ์ง๊ธ๋ ๊ธ์ก์ ํ์ฌ ๊ฐ์น๋ ๋ฏธ๋ ๊ฐ์น๋ฅผ ์ผ์ ๊ธฐ๊ฐ ๋์ ํ ์ธ์จ์ ์ ์ฉํด ์ฐ์ถํ ์ ์๋ค.
D. 1,000,000์์ ์ฐ 5% ๋ณต๋ฆฌ๋ก 2๋
๋์ ์์นํ์ ๊ฒฝ์ฐ, ๋ง๊ธฐ์ ๋ฐ์ ์ธ์ ์ด์๋ 100,000์์ด๋ค.
### ์ ๋ต:
D
๋ณธ ๋ชจ๋ธ์ ๋ค์ํ ์ถ์ฒ์ ๋ฐ์ดํฐ(Wikipedia ๋ฐ ํ๊ตญ์ํ์ ๊ณต๊ณต ๋ฐ์ดํฐ)๋ฅผ ํ์ฉํ์ฌ ํ์ต๋์์ผ๋ฉฐ, ๋ชจ๋ ๋ฐ์ดํฐ๋ ์ ์๊ถ ๋ฐ ์ฌ์ฉ ์ ์ฑ ์ ๋ฐ๋ผ ์ ์ ํ ์ฌ์ฉ๋์์ต๋๋ค.
๋ณธ ๋ชจ๋ธ์ mlabonne์ open-perfectblend ๋ฐ์ดํฐ์ ์ ์ฌ์ฉํ์ฌ ํ์ต๋์์ต๋๋ค. ๋ฐ์ดํฐ๋ Apache 2.0 ๋ผ์ด์ ์ค๋ฅผ ๋ฐ๋ฆ ๋๋ค. ๋ผ์ด์ ์ค์ ๋ํ ์์ธํ ๋ด์ฉ์ Apache 2.0 ๋ผ์ด์ ์ค์์ ํ์ธํ ์ ์์ต๋๋ค.
Have the files? Submit a torrent.
Submit a torrentHave the complete files and permission to share them? Replace the example folder path. The script checks the files, makes a torrent and submits its magnet and checksums. Keep your torrent client seeding. Get your community key from your settings, and read the script before running it.
curl -fsSL https://pirateface.co/package.sh | bash -s -- --repo SejongKRX/Sejong-Qwen-v1 ./model-folderpytorch_model-00002-of-00004.bin 4.9 GBpytorch_model-00002-of-00004.safetensors 4.9 GBpytorch_model-00001-of-00004.bin 4.9 GBpytorch_model-00001-of-00004.safetensors 4.9 GBpytorch_model-00003-of-00004.bin 4.3 GBpytorch_model-00003-of-00004.safetensors 4.3 GBpytorch_model-00004-of-00004.bin 1.1 GBpytorch_model-00004-of-00004.safetensors 1.1 GBunsloth/Qwen2.5-7B