YAML Metadata
Warning:
empty or missing yaml metadata in repo card
(https://huggingface.co/docs/hub/model-cards#model-card-metadata)
개요
- 한국어 요약 Task를 수행하는 모델입니다.
Base Model
Dataset
AI hub에 있는 아래 요약 데이터 중 3만건을 샘플링하여 사용하였습니다.
라이브러리 설치
pip3 install transformers gradio vllm
예제 코드
from vllm import LLM, SamplingParams
from transformers import AutoTokenizer
import gradio as gr
import os
model_path = "gangyeolkim/open-llama-2-ko-7b-summarization"
sampling_params = SamplingParams(max_tokens=1024, temperature=0.1)
tokenizer = AutoTokenizer.from_pretrained(model_path)
llm = LLM(model=model_path, tokenizer=model_path, tensor_parallel_size=1)
def gen(text, history):
text = [
"### 원문:",
f"{text}\n",
"### 요약:\n",
]
prompts = "\n".join(text)
outputs = llm.generate(prompts, sampling_params)
for output in outputs:
generated_text = output.outputs[0].text
return generated_text
demo = gr.ChatInterface(gen)
demo.launch(share=True)
- Downloads last month
- 47
Inference Providers
NEW
This model is not currently available via any of the supported Inference Providers.