4e823466ef8a83e142d7e32c75db879eab94b41a
Model: stockmark/stockmark-13b-instruct Source: Original Platform
license, language, library_name, pipeline_tag, tags
| license | language | library_name | pipeline_tag | tags | ||||
|---|---|---|---|---|---|---|---|---|
| mit |
|
transformers | text-generation |
|
Stockmark-13b-instruct
Stockmark-13b-instruct is an instruction-tuned version of Stockmark-13b, a 13 billion parameter Japanese LLM. This model is developed by Stockmark Inc.
We used data (2023/11/03 version) from Project of Development of Japanese Instruction data for LLM for instruction tuning.
Please see our blog for more details.
How to use
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("stockmark/stockmark-13b-instruct", device_map="auto", torch_dtype=torch.bfloat16)
tokenizer = AutoTokenizer.from_pretrained("stockmark/stockmark-13b-instruct")
instruction = "自然言語処理とは?"
prompt = f"""### Input:
{instruction}
### Output:
"""
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
tokens = model.generate(
**inputs,
max_new_tokens=128,
do_sample=True,
temperature=0.7
)
output = tokenizer.decode(tokens[0], skip_special_tokens=True)
print(output)
Training dataset
Project of Development of Japanese Instruction data for LLM
License
MIT
Developed by
Author
Description