Run this model with HF Jobs
Run Local-Novel-LLM-project/Ninja-V2-7B on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/Local-Novel-LLM-project/Ninja-V2-7B. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Local-Novel-LLM-project/Ninja-V2-7B on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/Local-Novel-LLM-project/Ninja-V2-7B. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/Local-Novel-LLM-project/Ninja-V2-7B. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use Local-Novel-LLM-project/Ninja-V2-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Local-Novel-LLM-project/Ninja-V2-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Local-Novel-LLM-project/Ninja-V2-7B")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Local-Novel-LLM-project/Ninja-V2-7B") model = AutoModelForCausalLM.from_pretrained("Local-Novel-LLM-project/Ninja-V2-7B", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Local-Novel-LLM-project/Ninja-V2-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Local-Novel-LLM-project/Ninja-V2-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Local-Novel-LLM-project/Ninja-V2-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Local-Novel-LLM-project/Ninja-V2-7B
- SGLang
How to use Local-Novel-LLM-project/Ninja-V2-7B 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 "Local-Novel-LLM-project/Ninja-V2-7B" \ --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": "Local-Novel-LLM-project/Ninja-V2-7B", "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 "Local-Novel-LLM-project/Ninja-V2-7B" \ --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": "Local-Novel-LLM-project/Ninja-V2-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Local-Novel-LLM-project/Ninja-V2-7B with Docker Model Runner:
docker model run hf.co/Local-Novel-LLM-project/Ninja-V2-7B
Ninja-V2-7B
このモデルは、ベクトルマージなどを用い作成された高性能ベースモデルです。 用途はチャットのみならず、文章創作など幅広いタスクに対応できます。
このモデルは、ローカルLLMに向き合う会企画のLocalAIハッカソンの高性能GPUサーバーの助けを借りて作成されました。
関係者の皆様に感謝申し上げます。
作成方法
モデルレシピは下記の通りです。
Ninja-v2-Base (mergekitにて作成)
models:
- model: MTSAIR/multi_verse_model
- model: HuggingFaceH4/zephyr-7b-beta
merge_method: model_stock
base_model: amazingvince/Not-WizardLM-2-7B
dtype: bfloat16
Novels-7B(ninja_mergerにて作成)
target_model: "stabilityai/japanese-stablelm-instruct-gamma-7b"
-
left: "Elizezen/Phos-7B" # ベースモデルの指定
right: "stabilityai/japanese-stablelm-instruct-gamma-7b" # サブモデルの指定
operation: "sub" # 組み合わせの操作。"mix"、"add"などを指定
velocity: 1.0
-
left: "Elizezen/Antler-7B" # ベースモデルの指定
right: "stabilityai/japanese-stablelm-instruct-gamma-7b" # サブモデルの指定
operation: "sub" # 組み合わせの操作。"mix"、"add"などを指定
velocity: 1.0
Ninja-v2(ninja_mergerにて作成)
target_model: "Ninja-v2-Base"
models: # 組み合わせの重み。0.0から1.0の範囲で指定
-
left: "NTQAI/chatntq-ja-7b-v1.0" # ベースモデルの指定
right: "mistralai/Mistral-7B-v0.1" # サブモデルの指定0
operation: "sub" # 組み合わせの操作。"mix"、"add"などを指定
velocity: 1.0
-
left: "Elizezen/Berghof-NSFW-7B" # ベースモデルの指定
right: "stabilityai/japanese-stablelm-instruct-gamma-7b" # サブモデルの指定
operation: "sub" # 組み合わせの操作。"mix"、"add"などを指定
velocity: 0.5
-
left: "Novels-7B" # ベースモデルの指定
right: "stabilityai/japanese-stablelm-instruct-gamma-7b" # サブモデルの指定
operation: "sub" # 組み合わせの操作。"mix"、"add"などを指定
velocity: 1.0
プロンプトテンプレート
必須ではありませんが、Vicuna-1.1テンプレートを使用することができます。 単純な文章生成においては推奨のテンプレートはありません。
システムプロンプト
BAD: あなたは○○として振る舞います
GOOD: あなたは○○です
BAD: あなたは○○ができます
GOOD: あなたは○○をします
制限
Apache-2.0ライセンスに従い使用してください。
- Downloads last month
- 43