Instructions to use DataPilot/ArrowPro-7B-KillerWhale with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DataPilot/ArrowPro-7B-KillerWhale with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="DataPilot/ArrowPro-7B-KillerWhale")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("DataPilot/ArrowPro-7B-KillerWhale") model = AutoModelForCausalLM.from_pretrained("DataPilot/ArrowPro-7B-KillerWhale") - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use DataPilot/ArrowPro-7B-KillerWhale with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DataPilot/ArrowPro-7B-KillerWhale" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DataPilot/ArrowPro-7B-KillerWhale", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/DataPilot/ArrowPro-7B-KillerWhale
- SGLang
How to use DataPilot/ArrowPro-7B-KillerWhale with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "DataPilot/ArrowPro-7B-KillerWhale" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DataPilot/ArrowPro-7B-KillerWhale", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "DataPilot/ArrowPro-7B-KillerWhale" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DataPilot/ArrowPro-7B-KillerWhale", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use DataPilot/ArrowPro-7B-KillerWhale with Docker Model Runner:
docker model run hf.co/DataPilot/ArrowPro-7B-KillerWhale
File size: 2,380 Bytes
82c7562 2f06f04 82c7562 2f06f04 82c7562 2f06f04 82c7562 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | ---
license: apache-2.0
language:
- ja
---

## 概要
ArrowPro-7B-KillerWhaleはMistral系のNTQAI/chatntq-ja-7b-v1.0をベースにAItuber、AIアシスタントの魂となるようにChat性能、および高いプロンプトインジェクション耐性を重視して作られました。
## How to use
```python
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("DataPilot/ArrowPro-7B-KillerWhale")
model = AutoModelForCausalLM.from_pretrained(
"DataPilot/ArrowPro-7B-KillerWhale",
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)
```
## ベンチマーク方法
LLaMa3が不安定のため、今回のスコアはGemini環境で新モデルのベンチマーク3回分の平均点からクジラのベンチマーク3回分の平均点を割って出した倍率をクジラのスコアである3.8にかけて出したものとなります。
## 謝辞
助言を与えてくださったすべての皆様に感謝します。
また、元モデルの開発者の皆様にも感謝を申し上げます。
このモデルを作成するために計算資源を貸してくれた[witness](https://x.com/i_witnessed_it)氏と[Meta Data Lab](https://x.com/Metadatalab)に感謝を申し上げます
## お願い
このモデルを利用する際は他人に迷惑をかけないように最大限留意してください。 |