stockmark/stockmark-13b-instruct

Model

Stockmark-13b-instruct

10

3 commits

1 linked in READMEs

updated Nov 28, 2024

See the code

README

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

Stockmark Inc.

Author

Takahiro Omi

endpoints_compatible
instruction-tuning
japanese
llama
llama-2
safetensors
text-generation
text-generation-inference
transformers

Contributors

omitakahiro

3 commits

stockmark/stockmark-13b-instruct

Model

Stockmark-13b-instruct

10

3 commits

1 linked in READMEs

updated Nov 28, 2024

See the code

README

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

Stockmark Inc.

Author

Takahiro Omi

endpoints_compatible
instruction-tuning
japanese
llama
llama-2
safetensors
text-generation
text-generation-inference
transformers

Contributors

omitakahiro

3 commits