Uploaded model

  • Developed by: ikedachin
  • License: apache-2.0
  • Finetuned from model : llm-jp/llm-jp-3-13b

This llama model was trained 2x faster with Unsloth and Huggingface's TRL library.

2024年9月、10月のニュース情報を継続事前学習したもの
epoch:3
r:128
lora_alpha:512
lr:3e-4
embedding_lr: 3e-5

狙い: lora_alphaを大きくして、SFTによる記憶忘却に耐えられるようにCPTによるベースモデルへの知識埋め込みの影響を大きくする

# import libraries
import tqdm
import torch
from datasets import load_dataset
from transformers import AutoModelForCausalLM, AutoTokenizer

# config
model_id = "ikedachin/llm-jp-3-13b-october-news-250311-merged"

# set Token of Huggingface
HF_TOKEN = <<YOUR_TOKEN>>

# download model and tokenizer
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    device_map = "auto",
    torch_dtype = torch.bfloat16,
    token = HF_TOKEN
)
tokenizer = AutoTokenizer.from_pretrained(model_id, token=HF_TOKEN)


# define inference function
def generate_from_model(input):
    prompt =  f"""{input}"""
    input = tokenizer(prompt, return_tensors='pt', add_special_tokens=True).to(model.device)
    input.pop('token_type_ids')
    output = model.generate(**input, max_new_tokens = 1000, use_cache = False, do_sample=False, repetition_penalty=1.2)
    return tokenizer.decode(output[0], skip_special_tokens=True)

# input prompt and inference
print(generate_from_model('石破茂さんは'))
# 石破茂さんは総裁選の最中に「国会で議論すべき」と発言を撤回。\n石破新首相は10月27日投開票の日程で、衆議院総選挙を行う意向を表明しました。9月30日の記者会見で<省略>
Downloads last month
49
Safetensors
Model size
13.7B params
Tensor type
BF16
·
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.

Model tree for ikedachin/llm-jp-3-13b-october-news-250311-merged

Finetuned
(1120)
this model

Dataset used to train ikedachin/llm-jp-3-13b-october-news-250311-merged

Collection including ikedachin/llm-jp-3-13b-october-news-250311-merged