Instructions to use theprint/Boptruth-NeuralMonarch-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use theprint/Boptruth-NeuralMonarch-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="theprint/Boptruth-NeuralMonarch-7B")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("theprint/Boptruth-NeuralMonarch-7B") model = AutoModelForCausalLM.from_pretrained("theprint/Boptruth-NeuralMonarch-7B") - llama-cpp-python
How to use theprint/Boptruth-NeuralMonarch-7B with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="theprint/Boptruth-NeuralMonarch-7B", filename="Boptruth-NeuralMonarch-7B-unsloth.F16.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 theprint/Boptruth-NeuralMonarch-7B with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf theprint/Boptruth-NeuralMonarch-7B:Q4_K_M # Run inference directly in the terminal: llama-cli -hf theprint/Boptruth-NeuralMonarch-7B:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf theprint/Boptruth-NeuralMonarch-7B:Q4_K_M # Run inference directly in the terminal: llama-cli -hf theprint/Boptruth-NeuralMonarch-7B: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 theprint/Boptruth-NeuralMonarch-7B:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf theprint/Boptruth-NeuralMonarch-7B: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 theprint/Boptruth-NeuralMonarch-7B:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf theprint/Boptruth-NeuralMonarch-7B:Q4_K_M
Use Docker
docker model run hf.co/theprint/Boptruth-NeuralMonarch-7B:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use theprint/Boptruth-NeuralMonarch-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "theprint/Boptruth-NeuralMonarch-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "theprint/Boptruth-NeuralMonarch-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/theprint/Boptruth-NeuralMonarch-7B:Q4_K_M
- SGLang
How to use theprint/Boptruth-NeuralMonarch-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 "theprint/Boptruth-NeuralMonarch-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": "theprint/Boptruth-NeuralMonarch-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 "theprint/Boptruth-NeuralMonarch-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": "theprint/Boptruth-NeuralMonarch-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use theprint/Boptruth-NeuralMonarch-7B with Ollama:
ollama run hf.co/theprint/Boptruth-NeuralMonarch-7B:Q4_K_M
- Unsloth Studio new
How to use theprint/Boptruth-NeuralMonarch-7B 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 theprint/Boptruth-NeuralMonarch-7B 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 theprint/Boptruth-NeuralMonarch-7B to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for theprint/Boptruth-NeuralMonarch-7B to start chatting
- Docker Model Runner
How to use theprint/Boptruth-NeuralMonarch-7B with Docker Model Runner:
docker model run hf.co/theprint/Boptruth-NeuralMonarch-7B:Q4_K_M
- Lemonade
How to use theprint/Boptruth-NeuralMonarch-7B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull theprint/Boptruth-NeuralMonarch-7B:Q4_K_M
Run and chat with the model
lemonade run user.Boptruth-NeuralMonarch-7B-Q4_K_M
List all available models
lemonade list
Boptruth-NeuralMonarch-7B
Boptruth-NeuralMonarch-7B is a merge of the following models using LazyMergekit:
🚨 Use the alpaca prompt format
If you use standard ChatML, you may end up with <|im_end|> tokens at the end of responses.
👀 Looking for GGUF?
Find quantized versions of this model right here.
🧩 Configuration
slices:
- sources:
- model: nbeerbower/bophades-mistral-truthy-DPO-7B
layer_range: [0, 32]
- model: mlabonne/NeuralMonarch-7B
layer_range: [0, 32]
merge_method: slerp
base_model: nbeerbower/bophades-mistral-truthy-DPO-7B
parameters:
t:
- filter: self_attn
value: [0, 0.5, 0.3, 0.7, 1]
- filter: mlp
value: [1, 0.5, 0.7, 0.3, 0]
- value: 0.5
dtype: bfloat16
💻 Usage
!pip install -qU transformers accelerate
from transformers import AutoTokenizer
import transformers
import torch
model = "theprint/Boptruth-NeuralMonarch-7B"
messages = [{"role": "user", "content": "What is a large language model?"}]
tokenizer = AutoTokenizer.from_pretrained(model)
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
pipeline = transformers.pipeline(
"text-generation",
model=model,
torch_dtype=torch.float16,
device_map="auto",
)
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
print(outputs[0]["generated_text"])
- Downloads last month
- 822
docker model run hf.co/theprint/Boptruth-NeuralMonarch-7B: