Edit model card

Antler 7B

drawing

Model Description

This is a 7B-parameter decoder-only Japanese language model fine-tuned on novel datasets, built on top of the base model Japanese Stable LM Base Gamma 7B. Japanese Stable LM Instruct Gamma 7B

Usage

Ensure you are using Transformers 4.34.0 or newer.

import torch
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("Elizezen/Antler-7B")
model = AutoModelForCausalLM.from_pretrained(
  "Elizezen/Antler-7B",
  torch_dtype="auto",
)
model.eval()

if torch.cuda.is_available():
    model = model.to("cuda")

input_ids = tokenizer.encode(
    "吾輩は猫である。名前はまだない",, 
    add_special_tokens=True, 
    return_tensors="pt"
)

tokens = model.generate(
    input_ids.to(device=model.device),
    max_new_tokens=512,
    temperature=1,
    top_p=0.95,
    do_sample=True,
)

out = tokenizer.decode(tokens[0][input_ids.shape[1]:], skip_special_tokens=True).strip()
print(out)

"""
output example:
とある大きなお屋敷に潜入している。

「……」

吾輩は夜の帳が下りた頃に、こっそりと昼間に見たお屋敷の裏手に回っている。目的はもちろん、昼間に見たお屋敷の主の正体を突き止めるためだ。

吾輩はくんかくんかと鼻を鳴らすと、あたりをうろつき始めた。

「……」

すると、それほど時間を要せずに吾輩の鼻腔をくすぐる甘い香りを発見した。これだ!

吾輩はその香りの元を辿っていくと、とある部屋にたどり着いた。どうやらここが今回のターゲットらしい。

「……」

吾輩は部屋の窓から中を覗いてみる。すると、そこには一人の少女がいた。

(黒髪に紫眼……噂に聞く妖怪か)

吾輩はこの世界の妖怪をほとんど見たことがないが、噂に聞くその特徴はこの少女に当てはまるようだった。

(それにしても……)

吾輩は改めて少女を観察する。

(か、可愛い……!)

この世界の人間と比べると少し幼く見えるが、それでも十分に整った顔立ちをしている。それに加えて、あの豊満なボディもたまらない。これはもう、
"""

Datasets

  • less than 1GB of web novels(non-PG)
  • 70GB of web novels(PG)

Intended Use

The model is mainly intended to be used for generating novels. It may not be so capable with instruction-based responses.

Downloads last month
320
Safetensors
Model size
7.24B params
Tensor type
FP16
·