Run this model with HF Jobs
Run gogamza/kobart-summarization on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/gogamza/kobart-summarization. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/gogamza/kobart-summarization on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use gogamza/kobart-summarization with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use gogamza/kobart-summarization with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("gogamza/kobart-summarization") model = AutoModelForSeq2SeqLM.from_pretrained("gogamza/kobart-summarization", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Korean News Summarization Model
Demo
https://huggingface.co/spaces/gogamza/kobart-summarization
How to use
import torch
from transformers import PreTrainedTokenizerFast
from transformers import BartForConditionalGeneration
tokenizer = PreTrainedTokenizerFast.from_pretrained('gogamza/kobart-summarization')
model = BartForConditionalGeneration.from_pretrained('gogamza/kobart-summarization')
text = "κ³Όκ±°λ₯Ό λ μ¬λ €λ³΄μ. λ°©μ‘μ 보λ μ°λ¦¬μ λͺ¨μ΅μ. λ
보μ μΈ λ§€μ²΄λ TVμλ€. μ¨ κ°μ‘±μ΄ λλ¬μμ TVλ₯Ό λ΄€λ€. κ°νΉ κ°μ‘±λ€λΌλ¦¬ λ΄μ€μ λλΌλ§, μλ₯ νλ‘κ·Έλ¨μ λλ¬μΈκ³ 리λͺ¨μ»¨ μνμ μ΄ λ²μ΄μ§κΈ°λ νλ€. κ°μ μ νΈνλ νλ‘κ·Έλ¨μ βλ³Έλ°©βμΌλ‘ 보기 μν μΈμμ΄μλ€. TVκ° ν λμΈμ§ λ λμΈμ§ μ¬λΆλ κ·Έλμ μ€μνλ€. μ§κΈμ μ΄λ€κ°. βμλ°©κ·Ήμ₯βμ΄λΌλ λ§μ μλ§μ΄ λλ€. TVκ° μλ μ§λ λ§λ€. λ―Έλμ΄μ ν νμ λ릴 μ μλ λ°©λ²μ λμ΄λ¬λ€. κ°μμ λ°©μμ κ°μμ ν΄λν°μΌλ‘, λ
ΈνΈλΆμΌλ‘, νλΈλ¦ΏμΌλ‘ μ½ν
μΈ λ₯Ό μ¦κΈ΄λ€."
raw_input_ids = tokenizer.encode(text)
input_ids = [tokenizer.bos_token_id] + raw_input_ids + [tokenizer.eos_token_id]
summary_ids = model.generate(torch.tensor([input_ids]))
tokenizer.decode(summary_ids.squeeze().tolist(), skip_special_tokens=True)
- Downloads last month
- 3,745
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support