Downloads · 30 days
29
4% of all-time downloads
gsjang/KoRnDAlpaca-Polyglot-12.8B
KoRnDAlpaca-Polyglot-12.8B is a text generation model from gsjang. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
- KoRnDAlpaca is based on Korean and fine-tuned with 1 million instruction data (R&D Instruction dataset v1.3) generated from Korean national research reports. - The base model of KoRnDAlpaca is EleutherAI/polyglot-en…
Downloads · 30 days
29
4% of all-time downloads
All-time downloads
688
Public
Repo size
155 GB
Likes
0
Public
Click a slice to open those files.
.bin51.7 GB · 100%
From the Hugging Face model README
from transformers import pipeline, AutoModelForCausalLM
import torch
LLM_MODEL = "NTIS/KoRnDAlpaca-Polyglot-12.8B"
query = "지능형 영상감시 기술의 대표적인 국내 기업은?"
llm_model = AutoModelForCausalLM.from_pretrained(
LLM_MODEL,
device_map="auto",
torch_dtype=torch.float16,
low_cpu_mem_usage=True,
# load_in_8bit=True,
# revision="8bit"
)
pipe = pipeline(
"text-generation",
model=llm_model,
tokenizer=LLM_MODEL,
# device=2,
)
ans = pipe(
f"### 질문: {query}\n\n### 답변:",
do_sample=True,
max_new_tokens=512,
temperature=0.1,
top_p=0.9,
return_full_text=False,
eos_token_id=2,
)
msg = ans[0]["generated_text"]
if len(msg.split('###')[0]) > 0:
output = msg.split('###')[0]
else:
output = '답변을 드리지 못하여 죄송합니다.'
print(output)
# 국내 지능형 영상감시 기술의 대표적인 기업으로는 한화 테크윈이 있다.