🚀 OpenCALM-Large
OpenCALM是一套僅含解碼器的語言模型,由CyberAgent公司基於日語數據集進行預訓練。它能夠助力自然語言處理相關任務,為日語語言處理提供強大的支持。
🚀 快速開始
安裝依賴
確保你已經安裝了torch
和transformers
庫,可以使用以下命令進行安裝:
pip install torch transformers
代碼示例
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("cyberagent/open-calm-large", device_map="auto", torch_dtype=torch.float16)
tokenizer = AutoTokenizer.from_pretrained("cyberagent/open-calm-large")
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)
✨ 主要特性
- 專為日語設計:OpenCALM系列模型是在日語數據集上進行預訓練的,能夠更好地處理日語相關的自然語言處理任務。
- 多規模選擇:提供了從
open-calm-small
到open-calm-7b
等多種不同規模的模型,可根據具體需求進行選擇。
📚 詳細文檔
模型詳情
模型信息
屬性 |
詳情 |
開發者 |
CyberAgent, Inc. |
模型類型 |
基於Transformer的語言模型 |
語言 |
日語 |
庫 |
GPT-NeoX |
許可證 |
OpenCALM採用知識共享署名 - 相同方式共享4.0國際許可協議(CC BY - SA 4.0)。使用此模型時,請向CyberAgent, Inc.提供適當的引用。 示例(英文):This model is a fine - tuned version of OpenCALM - XX developed by CyberAgent, Inc. The original model is released under the CC BY - SA 4.0 license, and this model is also released under the same CC BY - SA 4.0 license. For more information, please visit: https://creativecommons.org/licenses/by - sa/4.0/ 示例(日文):本モデルは、株式會社サイバーエージェントによるOpenCALM - XXをファインチューニングしたものです。元のモデルはCC BY - SA 4.0ライセンスのもとで公開されており、本モデルも同じくCC BY - SA 4.0ライセンスで公開します。詳しくはこちらをご覧ください: https://creativecommons.org/licenses/by - sa/4.0/ |
訓練數據集
- Wikipedia(日語)
- Common Crawl(日語)
📄 許可證
本模型採用知識共享署名 - 相同方式共享4.0國際許可協議(CC BY - SA 4.0)。
👨💻 作者
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},
}