hf_mirrors/gpt-neox-japanese-2.7b
Model Introduction
Files & versions
Analysis
You are visiting the mirror address of https://modelers.cn/SY_AICC/gpt-neox-japanese-2.7b. The repo is synchronized in real-time and is only for mirror acceleration access.

gpt-neox-japanese-2.7b

This repository provides a 2.7B-parameter Japanese GPT-NeoX-based model. The model was trained by ABEJA, Inc

Modification

  • Modify example and add npu support
  • Add denpendencies

Denpendencies

  • transformers==4.44.2
  • psutil==6.0.0
  • better_profanity==0.7.0
  • einops==0.6.1
  • protobuf==5.28.2

How to use

When using pipeline for text generation.

from openmind import pipeline, is_torch_npu_available
from openmind_hub import snapshot_download

if is_torch_npu_available():
	device = "npu:0"
else:
	device = "cpu"
generator = pipeline("text-generation", model="SY_AICC/gpt-neox-japanese-2.7b",device=device)
generated = generator(
    "人とAIが協調するためには、",
    max_length=300,
    do_sample=True,
    num_return_sequences=3,
    top_p=0.95,
    top_k=50
)
print(*generated, sep="\n")

"""
[out]
{"generated_text": "人とAIが協調するためには、「人が持っている優れた能力とAIの得意とする分野を掛け合わせる」ことが不可欠になります。"}
{"generated_text": "人とAIが協調するためには、双方の長所を活かしていくことが不可欠だと考えています。"}
{"generated_text": "人とAIが協調するためには、人間がAIを理解する、ということが重要です。人間には「AIに対してAIが何をするべきか」ということを明確に教えないと、AIはある程度の知識はあっても何をすべきかがわかりません。だから、コンピューターが考えたり、決めたりすることはAIではなく、人間が解釈して理解できるようにしなくて"}
"""

Dataset

The model was trained on Japanese Wikipedia.

Tokenization

The model uses a special sub-word tokenizer.

Licenese

The MIT license.