Instructions to use QuantFactory/Ninja-V2-7B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use QuantFactory/Ninja-V2-7B-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="QuantFactory/Ninja-V2-7B-GGUF", filename="Ninja-V2-7B.Q2_K.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use QuantFactory/Ninja-V2-7B-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf QuantFactory/Ninja-V2-7B-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/Ninja-V2-7B-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf QuantFactory/Ninja-V2-7B-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/Ninja-V2-7B-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf QuantFactory/Ninja-V2-7B-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf QuantFactory/Ninja-V2-7B-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf QuantFactory/Ninja-V2-7B-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf QuantFactory/Ninja-V2-7B-GGUF:Q4_K_M
Use Docker
docker model run hf.co/QuantFactory/Ninja-V2-7B-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use QuantFactory/Ninja-V2-7B-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "QuantFactory/Ninja-V2-7B-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "QuantFactory/Ninja-V2-7B-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/QuantFactory/Ninja-V2-7B-GGUF:Q4_K_M
- Ollama
How to use QuantFactory/Ninja-V2-7B-GGUF with Ollama:
ollama run hf.co/QuantFactory/Ninja-V2-7B-GGUF:Q4_K_M
- Unsloth Studio new
How to use QuantFactory/Ninja-V2-7B-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for QuantFactory/Ninja-V2-7B-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for QuantFactory/Ninja-V2-7B-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for QuantFactory/Ninja-V2-7B-GGUF to start chatting
- Docker Model Runner
How to use QuantFactory/Ninja-V2-7B-GGUF with Docker Model Runner:
docker model run hf.co/QuantFactory/Ninja-V2-7B-GGUF:Q4_K_M
- Lemonade
How to use QuantFactory/Ninja-V2-7B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull QuantFactory/Ninja-V2-7B-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Ninja-V2-7B-GGUF-Q4_K_M
List all available models
lemonade list
Ninja-V2-7B-GGUF
This is quantized version of Local-Novel-LLM-project/Ninja-V2-7B created using llama.cpp
Model Description
このモデルは、ベクトルマージなどを用い作成された高性能ベースモデルです。 用途はチャットのみならず、文章創作など幅広いタスクに対応できます。
このモデルは、ローカル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
- 83
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
Model tree for QuantFactory/Ninja-V2-7B-GGUF
Base model
Local-Novel-LLM-project/Ninja-V2-7B