Model Card for Model ID
The WriteMyPaper Gemma-2-2b-it model helps users to write abstracts of papers, fine-tuned by massive datasets of text summarization (each section and entire paper) of korean papers.
Model Details
- ๋ชจ๋ธ์ ์์ฑํ๊ณ ํ ์คํธ ์ฝ๋๋ฅผ ์์ฑํ๋ ๊ณผ์ ์ ํํ ๋ฆฌ์ผ์ https://espebaum.github.io/ml/Gemma2FineTuning ์์ ํ์ธํ์ค ์ ์์ต๋๋ค.
- ๊นํ๋ธ ๋ ํฌ์งํ ๋ฆฌ๋ https://github.com/Espebaum/Gemma2b-it-Write-My-Paper ์์ ํ์ธํ์ค ์ ์์ต๋๋ค.
Model Description
This model is a fine-tuned version of the Gemma-2-2B-IT model, tailored for academic paper summarization and generation tasks. It focuses on processing large-scale academic data to use abstract summaries to generate expanded full abstracts.
- Developed by: gyopark
- Model type: Causal Language Model (AutoModelForCausalLM)
- Language(s) (NLP): Korean
- License: Gemma Term of Use
- Finetuned from model [optional]: google/gemma-2-2b-it
Model Sources [optional]
Direct Use
This model is designed for use in academic environments where summarizing, analyzing, and generating longer texts based on research papers or technical documents is required. Users can input a brief overview of the abstract, and the model will provide a detailed expansion of the content.
Downstream Use [optional]
The model can be further fine-tuned for specific domains within academic writing, such as biomedical research, legal papers, or engineering documentation. It can also be integrated into platforms for automated academic writing assistance or research paper generation.
Out-of-Scope Use
The model is not suitable for general-purpose text generation outside academic or technical contexts. It may not perform well in creative writing tasks or in generating content without structured input like research articles.
Recommendations
Users should ensure that the input is structured in a format appropriate for academic or technical summarization. Since the model generates based on existing research content, it is recommended to verify the accuracy of the output for fact-checking.
How to Get Started with the Model
Use the code below to get started with the model.
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
FINETUNED_MODEL = "gyopark/gemma-2-2b-it-WriteMyPaper"
model = AutoModelForCausalLM.from_pretrained(FINETUNED_MODEL, device_map="auto")
tokenizer = AutoTokenizer.from_pretrained(FINETUNED_MODEL)
pipe = pipeline(
"text-generation",
model=model,
tokenizer=tokenizer,
)
# doc
<!-- ํใ์คใ์ผ 3๊ตญ์ ์ ์น์ ํ๋์ ์ฌํ๊ฒฝ์ ์ฒด์ ๋ฅผ โ์ธ๊ณ๊ฐ์น๊ด์กฐ์ฌโ ์๋ฃ๋ฅผ ์ด์ฉํ์ฌ ๊ตญ๊ฐ ๊ฐ ๋น๊ต๋ถ์ํ์๋ค.
์ค๊ตญ์ ์์์์ ๊ฐ์น ์งํฅ์ฑ์ด ๊ฐ์ฅ ๋๊ณ ์ผ๋ณธ์ด ๊ฐ์ฅ ๋ฎ๋ค. ์๊ตฌ์ ๋ฏผ์ฃผ์ฃผ์ ์งํฅ์ฑ์ ์ผ๋ณธ์ด ๊ฐ์ฅ ๋๊ณ ํ๊ตญ์ด ๊ทธ ๋ค์์ด๋ฉฐ ์ค๊ตญ์ด ๊ฐ์ฅ ๋ฎ๋ค.
ํใ์คใ์ผ 3๊ตญ์ ์ ์น์ ํ๋์์์ ์ฐจ์ด๋ ์ฌํ๊ตฌ์กฐ์ ๋ณ๋ ๊ฒฝํ์ ๋ฐ์ํ๋ ๊ฒ์ด๋ค. -->
messages = [
{
"role": "user",
"content": "๋ค์ ์์ฝ๋ ๊ธ์ ํ ๋ฌธ๋จ์ผ๋ก ๊ธธ๊ฒ ์จ์ฃผ์ธ์.:\n\n{}".format(doc)
}
]
prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
# prompt
<!-- <bos><start_of_turn>user
\n๋ค์ ์์ฝ๋ ๊ธ์ ํ ๋ฌธ๋จ์ผ๋ก ๊ธธ๊ฒ ์จ์ฃผ์ธ์.:\n
\nํใ์คใ์ผ 3๊ตญ์ ์ ์น์ ํ๋์ ์ฌํ๊ฒฝ์ ์ฒด์ ๋ฅผ โ์ธ๊ณ๊ฐ์น๊ด์กฐ์ฌโ ์๋ฃ๋ฅผ ์ด์ฉํ์ฌ ๊ตญ๊ฐ ๊ฐ ๋น๊ต๋ถ์ํ์๋ค.
์ค๊ตญ์ ์์์์ ๊ฐ์น ์งํฅ์ฑ์ด ๊ฐ์ฅ ๋๊ณ ์ผ๋ณธ์ด ๊ฐ์ฅ ๋ฎ๋ค. ์๊ตฌ์ ๋ฏผ์ฃผ์ฃผ์ ์งํฅ์ฑ์ ์ผ๋ณธ์ด ๊ฐ์ฅ ๋๊ณ ํ๊ตญ์ด ๊ทธ ๋ค์์ด๋ฉฐ ์ค๊ตญ์ด ๊ฐ์ฅ ๋ฎ๋ค.
ํใ์คใ์ผ 3๊ตญ์ ์ ์น์ ํ๋์์์ ์ฐจ์ด๋ ์ฌํ๊ตฌ์กฐ์ ๋ณ๋ ๊ฒฝํ์ ๋ฐ์ํ๋ ๊ฒ์ด๋ค.<end_of_turn>\n
<start_of_turn>model\n -->
outputs = pipe(
prompt,
do_sample=True,
add_special_tokens=True,
max_new_tokens=1024
)
outputs[0]['generated_text']
Training Details
Training Data
The model was fine-tuned on a dataset of academic papers, including research articles and technical reports, focusing on generating accurate summaries and expanding scientific content.
Training Procedure
- Training regime: Mixed precision (fp16)
- Hardware: 1 L4 GPU
- Training time: Approximately 3 hours
- Fine-tuning approach: Low-Rank Adaptation (LoRA)
Summary
The model effectively processes academic papers, providing high-quality summaries and generating longer expansions of sections or abstracts. It supports Korean research documents.
Citation [optional]
Citation
BibTeX:
@misc{gyopark_gemma_2_2b_it_WriteMyPaper,
author = {gyopark},
title = {WriteMyPaper},
year = {2024},
url = {https://huggingface.co/gyopark/gemma-2-2b-it-WriteMyPaper},
}
Model tree for gyopark/gemma-2-2b-it-WriteMyPaper
Base model
google/gemma-2b-it