Instructions to use ToastyPigeon/BlackMagic-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ToastyPigeon/BlackMagic-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ToastyPigeon/BlackMagic-7B")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ToastyPigeon/BlackMagic-7B") model = AutoModelForCausalLM.from_pretrained("ToastyPigeon/BlackMagic-7B") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use ToastyPigeon/BlackMagic-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ToastyPigeon/BlackMagic-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ToastyPigeon/BlackMagic-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ToastyPigeon/BlackMagic-7B
- SGLang
How to use ToastyPigeon/BlackMagic-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 "ToastyPigeon/BlackMagic-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": "ToastyPigeon/BlackMagic-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 "ToastyPigeon/BlackMagic-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": "ToastyPigeon/BlackMagic-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ToastyPigeon/BlackMagic-7B with Docker Model Runner:
docker model run hf.co/ToastyPigeon/BlackMagic-7B
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("ToastyPigeon/BlackMagic-7B")
model = AutoModelForCausalLM.from_pretrained("ToastyPigeon/BlackMagic-7B")merge
This is a merge of pre-trained language models created using mergekit.
Thank you to MatchaSpeed for picking out the models to go into this merge. You're awesome! 🤗
The models in this merge were chosen for their attention to detail and/or their creativity.
Based on each model's individual strength, weights were applied to prioritize the model's intelligence (self-attention weights) or style/creativity (multi-layer perceptron weights).
GGUF versions available courtesy of BackyardAI https://huggingface.co/backyardai/BlackMagic-7B-GGUF
Usage
Recommended prompt format is Alpaca, as this is most widely accepted by the component models.
Merge Details
Merge Method
This model was merged using the task arithmetic merge method using Mistral-7B-v0.1 as a base.
Models Merged
The following models were included in the merge:
- fearlessdots/WizardLM-2-7B-abliterated
- Gryphe/MythoMist-7b
- Sao10K/Frostwind-v2.1-m7
- senseable/Westlake-7b-v2
- maywell/PiVoT-0.1-Evil-a
- Undi95/Toppy-M-7B
Configuration
The following YAML configuration was used to produce this model:
models:
- model: fearlessdots/WizardLM-2-7B-abliterated
parameters:
weight: 1.0
- model: Undi95/Toppy-M-7B
parameters:
weight:
- filter: self_attn
value: 0.8
- value: 0.5
- model: senseable/Westlake-7b-v2
parameters:
weight:
- filter: self_attn
value: 0.6
- value: 0.4
- model: maywell/PiVoT-0.1-Evil-a
parameters:
weight:
- filter: mlp
value: 0.2
- value: 0.0
- model: Sao10K/Frostwind-v2.1-m7
parameters:
weight:
- filter: self_attn
value: 0.2
- filter: mlp
value: 0.8
- value: 0.5
- model: Gryphe/MythoMist-7b
parameters:
weight:
- filter: mlp
value: 0.6
- value: 0.0
base_model: TeeZee/Mistral-7B-v0.1-fp32
merge_method: task_arithmetic
dtype: float32
- Downloads last month
- 8
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ToastyPigeon/BlackMagic-7B")