File size: 5,186 Bytes
f3f5fee 44a71f3 f3f5fee 6d76dd8 cda9923 f3f5fee 9835a6e f3f5fee 44a71f3 f3f5fee cda9923 f3f5fee d05ed29 f3f5fee cda9923 f3f5fee cda9923 f3f5fee cda9923 f3f5fee cda9923 f3f5fee 4273acd a3c5a8e 41100f4 a3c5a8e 41100f4 a3c5a8e 41100f4 f3f5fee 43f673f f3f5fee 43f673f f3f5fee 43f673f f3f5fee 43f673f f3f5fee 43f673f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
---
base_model: google/gemma-2b-it
library_name: transformers
license: gemma
language:
- ko
pipeline_tag: text-generation
---
# 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]
- **Repository:** https://huggingface.co/gyopark/gemma-2-2b-it-WriteMyPaper
### 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.
```python
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:**
```bibtex
@misc{gyopark_gemma_2_2b_it_WriteMyPaper,
author = {gyopark},
title = {WriteMyPaper},
year = {2024},
url = {https://huggingface.co/gyopark/gemma-2-2b-it-WriteMyPaper},
}
``` |