Instructions to use blummone/summary_news_static with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use blummone/summary_news_static with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("SEOKDONG/llama3.1_korean_v1.1_sft_by_aidx") model = PeftModel.from_pretrained(base_model, "blummone/summary_news_static") - Notebooks
- Google Colab
- Kaggle
- Model Card for Model ID
Model Card for Model ID
뉴스 기사를 특정 포맷으로 요약하도록 학습한 LoRA adapter 입니다.
base 모델을 load 한 뒤에, adapter를 끼워주면 됩니다.
Model Details
Model Description
Colab에서 훈련시키기 위해 18GB 이하의 korean fine-tuned LLM 모델 선정했습니다.
자세한 사항은 korean llm benchmark leaderboard를 참고했습니다.
- **Language(s) (NLP): ** Korean
- Finetuned from model [optional]: SEOKDONG/llama3.1_korean_v1.1_sft_by_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
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
[More Information Needed]
Training Procedure
Preprocessing [optional]
[More Information Needed]
Training Hyperparameters
- Training regime: [More Information Needed]
Speeds, Sizes, Times [optional]
[More Information Needed]
Evaluation
Testing Data, Factors & Metrics
Testing Data
[More Information Needed]
Factors
[More Information Needed]
Metrics
[More Information Needed]
Results
[More Information Needed]
Summary
Model Examination [optional]
[More Information Needed]
Environmental Impact
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]
BibTeX:
[More Information Needed]
APA:
[More Information Needed]
Glossary [optional]
[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
- Downloads last month
- 9
Model tree for blummone/summary_news_static
Base model
meta-llama/Llama-3.1-8B