Team Ai
Modelpublic

blummone/summary_news_static

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes12downloads
Model Card

Model Card for Model ID

뉴스 기사를 특정 포맷으로 요약하도록 학습한 LoRA adapter 입니다.

base 모델을 load 한 뒤에, adapter를 끼워주면 됩니다.

Model Details

Model Description

<!-- Provide a longer summary of what this model is. -->

Colab에서 훈련시키기 위해 18GB 이하의 korean fine-tuned LLM 모델 선정했습니다.

자세한 사항은 korean llm benchmark leaderboard를 참고했습니다.

  • —Language(s) (NLP): Korean
  • —Finetuned from model [optional]: SEOKDONG/llama3.1koreanv1.1sftby_aidx

How to Get Started with the Model

Use the code below to get started with the model.

from transformers import AutoConfig
from peft import PeftModel, PeftConfig
from unsloth import FastLanguageModel
import torch

model_name = "SEOKDONG/llama3.1_korean_v1.1_sft_by_aidx"
model_config = AutoConfig.from_pretrained(
    model_name
)

max_seq_length = 2048 # Choose any! We auto support RoPE Scaling internally!
dtype = None # None for auto detection. Float16 for Tesla T4, V100, Bfloat16 for Ampere+
load_in_4bit = True # Use 4bit quantization to reduce memory usage. Can be False.

model, tokenizer = FastLanguageModel.from_pretrained(
    model_name = model_name, # Choose ANY! eg mistralai/Mistral-7B-Instruct-v0.2
    max_seq_length = max_seq_length,
    dtype = dtype,
    load_in_4bit = load_in_4bit,
    #
)

# LoRA adapter 설정 로드 (peft_config.json 파일)
config = PeftConfig.from_pretrained(adapter_path)

# LoRA adapter 로드 및 기본 모델에 적용
model = PeftModel.from_pretrained(model, adapter_path, config=config)

Direct Use

<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->

prompt_style = tokenizer.apply_chat_template(
    prompt, tokenize=False, add_generation_prompt=True
)

inputs = tokenizer(
    prompt_style,
    return_tensors="pt",
).to("cuda")

res = model.generate(**inputs, max_new_tokens=max_new_tokens, eos_token_id=tokenizer.eos_token_id)
prompt_txt = tokenizer.decode(res[0])

response = prompt_txt.split(end_of_header_token)[-1].strip().strip(tokenizer.eos_token)

Training Details

Training Data

<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->

[More Information Needed]

Training Procedure

<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->

Preprocessing [optional]

[More Information Needed]

Training Hyperparameters
  • —Training regime: [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
Speeds, Sizes, Times [optional]

<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->

[More Information Needed]

Evaluation

<!-- This section describes the evaluation protocols and provides the results. -->

Testing Data, Factors & Metrics

Testing Data

<!-- This should link to a Dataset Card if possible. -->

[More Information Needed]

Factors

<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->

[More Information Needed]

Metrics

<!-- These are the evaluation metrics being used, ideally with a description of why. -->

[More Information Needed]

Results

[More Information Needed]

Summary

Model Examination [optional]

<!-- Relevant interpretability work for the model goes here -->

[More Information Needed]

Environmental Impact

<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->

Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).

  • —Hardware Type: [More Information Needed]
  • —Hours used: [More Information Needed]
  • —Cloud Provider: [More Information Needed]
  • —Compute Region: [More Information Needed]
  • —Carbon Emitted: [More Information Needed]

Technical Specifications [optional]

Model Architecture and Objective

[More Information Needed]

Compute Infrastructure

[More Information Needed]

Hardware

[More Information Needed]

Software

[More Information Needed]

Citation [optional]

<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->

BibTeX:

[More Information Needed]

APA:

[More Information Needed]

Glossary [optional]

<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->

[More Information Needed]

More Information [optional]

[More Information Needed]

Model Card Authors [optional]

[More Information Needed]

Model Card Contact

[More Information Needed]

Framework versions

  • —PEFT 0.14.0