Instructions to use DataPilot/ArrowPro-7B-Nyan with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DataPilot/ArrowPro-7B-Nyan with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="DataPilot/ArrowPro-7B-Nyan")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("DataPilot/ArrowPro-7B-Nyan") model = AutoModelForCausalLM.from_pretrained("DataPilot/ArrowPro-7B-Nyan") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use DataPilot/ArrowPro-7B-Nyan with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DataPilot/ArrowPro-7B-Nyan" # 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-Nyan", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/DataPilot/ArrowPro-7B-Nyan
- SGLang
How to use DataPilot/ArrowPro-7B-Nyan 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-Nyan" \ --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-Nyan", "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-Nyan" \ --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-Nyan", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use DataPilot/ArrowPro-7B-Nyan with Docker Model Runner:
docker model run hf.co/DataPilot/ArrowPro-7B-Nyan
概要
当モデルはMistral系のArrowPro-7B-KUJIRAをもとにdatabricks-dolly-15k-Nyan-jaを用いて語尾を「にゃん!」にするファインチューニングを実施したモデルとなります。
How to use
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("DataPilot/ArrowPro-7B-Nyan")
model = AutoModelForCausalLM.from_pretrained(
"DataPilot/ArrowPro-7B-Nyan",
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)
謝辞
このモデルを作成するために計算資源を貸してくれたwitness氏とMeta Data Labに感謝を申し上げます
お願い
このモデルを利用する際は他人に迷惑をかけないように最大限留意してください。
- Downloads last month
- 4

Install from pip and serve model
# Install vLLM from pip: pip install vllm# Start the vLLM server: vllm serve "DataPilot/ArrowPro-7B-Nyan"# 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-Nyan", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'