Text Generation
Transformers
Safetensors
NeMo
English
mistral
mergekit
Merge
karcher_stock
conversational
text-generation-inference
Instructions to use Naphula-Archives/Piranha-12B-v1a with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Naphula-Archives/Piranha-12B-v1a with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Naphula-Archives/Piranha-12B-v1a") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Naphula-Archives/Piranha-12B-v1a") model = AutoModelForCausalLM.from_pretrained("Naphula-Archives/Piranha-12B-v1a", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - NeMo
How to use Naphula-Archives/Piranha-12B-v1a with NeMo:
# tag did not correspond to a valid NeMo domain.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Naphula-Archives/Piranha-12B-v1a with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Naphula-Archives/Piranha-12B-v1a" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Naphula-Archives/Piranha-12B-v1a", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Naphula-Archives/Piranha-12B-v1a
- SGLang
How to use Naphula-Archives/Piranha-12B-v1a 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 "Naphula-Archives/Piranha-12B-v1a" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Naphula-Archives/Piranha-12B-v1a", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "Naphula-Archives/Piranha-12B-v1a" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Naphula-Archives/Piranha-12B-v1a", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Naphula-Archives/Piranha-12B-v1a with Docker Model Runner:
docker model run hf.co/Naphula-Archives/Piranha-12B-v1a
🐟 Piranha 12B v1a
A prototype test for Savage Sands. This one is partially censored (despite having all uncensored components) but very creative. Therefore, the merge is "failed" because it should not have refusals. It was good enough to upload however. It recommended a "Piranha Tank", hence the name.
I tested with unablated base_model, and it seems this increased refusals a bit more.
architecture: MistralForCausalLM
base_model: B:/12B/MuXodious--Mistral-Nemo-Instruct-2407-absolute-heresy # mistralai--Mistral-Nemo-Instruct-2407
models:
- model: B:/12B/EldritchLabs--MN-12B-RP-Ink-Longform-MPOA
parameters:
weight: 1.0
- model: B:/12B/EldritchLabs--Human-Like-Mistral-Nemo-Instruct-2407-MPOA
parameters:
weight: 1.0
- model: B:/12B/MuXodious-Rocinante-X-12B-v1-absolute-heresy # TheDrummer--Rocinante-X-12B-v1
parameters:
weight: 1.0
merge_method: karcher_stock # v12B
parameters:
filter_wise: true
max_iter: 25
min_iter: 10
tol: 1.0e-9
magnitude_mean_geometric: false # TRUE makes it 75% karcher
dtype: float32
out_dtype: bfloat16
tokenizer:
source: union
chat_template: auto
name: karcher_stock_12b_v1
- Downloads last month
- 26