How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="DataPilot/ArrowPro-7B-KUJIRA")
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("DataPilot/ArrowPro-7B-KUJIRA")
model = AutoModelForCausalLM.from_pretrained("DataPilot/ArrowPro-7B-KUJIRA")
Quick Links

image/jpeg

ๆฆ‚่ฆ

ArrowPro-7B-KUJIRAใฏMistral็ณปใฎNTQAI/chatntq-ja-7b-v1.0ใ‚’ใƒ™ใƒผใ‚นใซAItuberใ€AIใ‚ขใ‚ทใ‚นใ‚ฟใƒณใƒˆใฎ้ญ‚ใจใชใ‚‹ใ‚ˆใ†ใซChatๆ€ง่ƒฝใ€ใŠใ‚ˆใณ้ซ˜ใ„ใƒ—ใƒญใƒณใƒ—ใƒˆใ‚คใƒณใ‚ธใ‚งใ‚ฏใ‚ทใƒงใƒณ่€ๆ€งใ‚’้‡่ฆ–ใ—ใฆไฝœใ‚‰ใ‚Œใพใ—ใŸใ€‚

ใƒ™ใƒณใƒใƒžใƒผใ‚ฏ

ArrowPro-7B-KUJIRAใฏใƒ™ใƒณใƒใƒžใƒผใ‚ฏ(ELYZA-TASK100)ใซใŠใ„ใฆ็ด„3.8(LLaMa3-70Bๆบ–ๆ‹ )ใ‚’ใƒžใƒผใ‚ฏใ—ใ€7BใซใŠใ„ใฆๆ—ฅๆœฌ่ชžๆ€ง่ƒฝไธ–็•Œไธ€ใ‚’้”ๆˆใ—ใพใ—ใŸใ€‚

image/png

How to use

import torch
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("DataPilot/ArrowPro-7B-KUJIRA")
model = AutoModelForCausalLM.from_pretrained(
  "DataPilot/ArrowPro-7B-KUJIRA",
  torch_dtype="auto",
)
model.eval()

if torch.cuda.is_available():
    model = model.to("cuda")

def build_prompt(user_query):
    sys_msg = "ใ‚ใชใŸใฏๆ—ฅๆœฌ่ชžใ‚’่ฉฑใ™ๅ„ช็ง€ใชใ‚ขใ‚ทใ‚นใ‚ฟใƒณใƒˆใงใ™ใ€‚ๅ›ž็ญ”ใซใฏๅฟ…ใšๆ—ฅๆœฌ่ชžใง็ญ”ใˆใฆใใ ใ•ใ„ใ€‚"
    template = """[INST] <<SYS>>
{}
<</SYS>>

{}[/INST]"""
    return template.format(sys_msg,user_query)

# Infer with prompt without any additional input
user_inputs = {
    "user_query": "ใพใฉใƒžใ‚ฎใงไธ€็•ชใ‹ใ‚ใ„ใ„ใ‚ญใƒฃใƒฉใฏใ ใ‚Œ๏ผŸ",
}
prompt = build_prompt(**user_inputs)

input_ids = tokenizer.encode(
    prompt, 
    add_special_tokens=True, 
    return_tensors="pt"
)

tokens = model.generate(
    input_ids.to(device=model.device),
    max_new_tokens=500,
    temperature=1,
    top_p=0.95,
    do_sample=True,
)

out = tokenizer.decode(tokens[0][input_ids.shape[1]:], skip_special_tokens=True).strip()
print(out)

่ฌ่พž

ๅŠฉ่จ€ใ‚’ไธŽใˆใฆใใ ใ•ใฃใŸใ™ในใฆใฎ็š†ๆง˜ใซๆ„Ÿ่ฌใ—ใพใ™ใ€‚ ใพใŸใ€ๅ…ƒใƒขใƒ‡ใƒซใฎ้–‹็™บ่€…ใฎ็š†ๆง˜ใซใ‚‚ๆ„Ÿ่ฌใ‚’็”ณใ—ไธŠใ’ใพใ™ใ€‚

ใŠ้ก˜ใ„

ใ“ใฎใƒขใƒ‡ใƒซใ‚’ๅˆฉ็”จใ™ใ‚‹้š›ใฏไป–ไบบใซ่ฟทๆƒ‘ใ‚’ใ‹ใ‘ใชใ„ใ‚ˆใ†ใซๆœ€ๅคง้™็•™ๆ„ใ—ใฆใใ ใ•ใ„ใ€‚

Downloads last month
16
Safetensors
Model size
7B params
Tensor type
BF16
ยท
Inference Providers NEW

Model tree for DataPilot/ArrowPro-7B-KUJIRA

Merges
2 models
Quantizations
2 models