PLaMo 2.1 2B

Model Description

PLaMo 2.1 2B is a model developed by Preferred Elements Inc., created by pruning parameters from a 8B-parameter model pre-trained on English and Japanese datasets.

PLaMo 2.1 2B is released under PLaMo community license. Please check the following license and agree to this before downloading.

NOTE: This model has NOT been instruction-tuned for chat dialog or other downstream tasks.

For commercial users

Please check the PLaMo community license and contact us via the following form to use commercial purpose.

Usage

Requirements

numpy>=1.26.4
numba>=0.60.0
torch>=2.4.1
transformers>=4.44.2
mamba_ssm>=2.2.2
causal_conv1d>=1.4.0

Use a pipeline as a high-level helper

import transformers
pipeline = transformers.pipeline("text-generation", model="pfnet/plamo-2.1-2b-cpt", trust_remote_code=True)
print(pipeline("The future of artificial intelligence technology is ", max_new_tokens=32))

Load model directly

from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("pfnet/plamo-2.1-2b-cpt", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("pfnet/plamo-2.1-2b-cpt", trust_remote_code=True)
text = "これからの人工知能技術は"
input_ids = tokenizer(text, return_tensors="pt").input_ids
generated_tokens = model.generate(
    inputs=input_ids,
    max_new_tokens=32,
    do_sample=True,
    top_k=50,
    top_p=0.95,
    temperature=1.0,
)[0]
generated_text = tokenizer.decode(generated_tokens)
print(generated_text)

Model Details

  • Model size: 8B
  • Developed by: Preferred Elements, Inc.
  • Model type: Causal decoder-only
  • Language(s): English, Japanese
  • License: PLaMo community license

Tokenizer

PLaMo 2 tokenizer is optimized by numba, which is JIT compiler for numerical functions. The tokenizer is trained on a subset of the datasets for model pre-training.

Tech Blog

Bias, Risks, and Limitations

PLaMo 2.1 2B is a new technology that carries risks with use. Testing conducted to date has been in English and Japanese, and has not covered, nor could it cover all scenarios. For these reasons, as with all LLMs, PLaMo 2.1 2B’s potential outputs cannot be predicted in advance, and the model may in some instances produce inaccurate, biased or other objectionable responses to user prompts. Therefore, before deploying any applications of PLaMo 2.1 2B, developers should perform safety testing and tuning tailored to their specific applications of the model.

Acknowledgement

This model is trained under the project, “Research and Development Project of the Enhanced Infrastructures for Post 5G Information and Communication System” (JPNP 20017), subsidized by the New Energy and Industrial Technology Development Organization (NEDO).

AI policies for Preferred Networks, Inc. group

Downloads last month
4
Safetensors
Model size
2.45B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support