weblab-10b / README.md
Takeshi Kojima
Update README.md
98be71c
|
raw
history blame
2.2 kB
metadata
license: cc-by-nc-4.0

weblab-10b

Overview

This repository provides a Japanese-centric multilingual GPT-NeoX model of 10 billion parameters.


Benchmarking

  • Japanese benchmark

    • The 4-task average accuracy is based on results of JCommonsenseQA, JNLI, MARC-ja, and JSQuAD.
    Model Average JCommonsenseQA JNLI MARC-ja JSQuAD
    weblab-10b-instruction-sft 79.04 74.35 65.65 96.06 80.09
    weblab-10b 67.27 65.86 54.19 84.49 64.54

How to use the model

import torch
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("Kojima777/weblab-10b", use_fast=False)
model = AutoModelForCausalLM.from_pretrained("Kojima777/weblab-10b")

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

text = "吾輩は猫である。"
token_ids = tokenizer.encode(text, add_special_tokens=False, return_tensors="pt")

with torch.no_grad():
    output_ids = model.generate(
        token_ids.to(model.device),
        max_new_tokens=100,
        do_sample=True,
        temperature=0.6,
        top_p=0.9,
        pad_token_id=tokenizer.pad_token_id,
        bos_token_id=tokenizer.bos_token_id,
        eos_token_id=tokenizer.eos_token_id
    )

output = tokenizer.decode(output_ids.tolist()[0])
print(output)

Licenese

cc-by-nc-4.0