英文

OpenCALM-3B

模型说明

OpenCALM是由CyberAgent开发的一套基于解码器的语言模型,预训练于日本数据集。

用法

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained("cyberagent/open-calm-3b", device_map="auto", torch_dtype=torch.float16)
tokenizer = AutoTokenizer.from_pretrained("cyberagent/open-calm-3b")

inputs = tokenizer("AIによって私達の暮らしは、", return_tensors="pt").to(model.device)
with torch.no_grad():
    tokens = model.generate(
        **inputs,
        max_new_tokens=64,
        do_sample=True,
        temperature=0.7,
        top_p=0.9,
        repetition_penalty=1.05,
        pad_token_id=tokenizer.pad_token_id,
    )
    
output = tokenizer.decode(tokens[0], skip_special_tokens=True)
print(output)

模型细节

Model Params Layers Dim Heads Dev ppl
1232321 160M 12 768 12 19.7
1233321 400M 24 1024 16 13.8
1234321 830M 24 1536 16 11.3
1235321 1.4B 24 2048 16 10.3
1236321 2.7B 32 2560 32 9.7
1237321 6.8B 32 4096 32 8.2
  • 开发者: CyberAgent, Inc.
  • 模型类型:基于Transformer的语言模型
  • 语言:日语
  • 库: GPT-NeoX
  • 许可证:OpenCALM采用知识共享署名-相同方式共享 4.0 国际许可协议 ( CC BY-SA 4.0 )。在使用该模型时,请适当署名 CyberAgent, Inc.
    • 示例 (en):该模型是由CyberAgent开发的OpenCALM-XX的精调版本。原始模型在 CC BY-SA 4.0 许可下发布,而该模型也在同一许可下发布。有关详细信息,请访问: https://creativecommons.org/licenses/by-sa/4.0/
    • 示例 (ja):本模型是株式会社CyberAgent开发的OpenCALM-XX的精调版本。原始模型根据 CC BY-SA 4.0 许可证发布,而该模型也遵循相同的 CC BY-SA 4.0 许可证进行发布。有关更多信息,请访问: https://creativecommons.org/licenses/by-sa/4.0/

训练数据集

  • 维基百科 (ja)
  • Common Crawl (ja)

作者

Ryosuke Ishigami

引用

@software{gpt-neox-library,
  title = {{GPT-NeoX: Large Scale Autoregressive Language Modeling in PyTorch}},
  author = {Andonian, Alex and Anthony, Quentin and Biderman, Stella and Black, Sid and Gali, Preetham and Gao, Leo and Hallahan, Eric and Levy-Kramer, Josh and Leahy, Connor and Nestler, Lucas and Parker, Kip and Pieler, Michael and Purohit, Shivanshu and Songz, Tri and Phil, Wang and Weinbach, Samuel},
  url = {https://www.github.com/eleutherai/gpt-neox},
  doi = {10.5281/zenodo.5879544},
  month = {8},
  year = {2021},
  version = {0.0.1},
}