Merged Models
Collection
These are models created by merging existing models that are already fine tuned or even merged themselves. • 5 items • Updated • 1
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", device_map="auto")How to use theprint/Boptruth-NeuralMonarch-7B with llama.cpp:
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf theprint/Boptruth-NeuralMonarch-7B:Q4_K_M # Run inference directly in the terminal: llama cli -hf theprint/Boptruth-NeuralMonarch-7B:Q4_K_M
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf theprint/Boptruth-NeuralMonarch-7B:Q4_K_M # Run inference directly in the terminal: llama cli -hf theprint/Boptruth-NeuralMonarch-7B:Q4_K_M
# 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
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
docker model run hf.co/theprint/Boptruth-NeuralMonarch-7B:Q4_K_M
How to use theprint/Boptruth-NeuralMonarch-7B with vLLM:
# 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
}'docker model run hf.co/theprint/Boptruth-NeuralMonarch-7B:Q4_K_M
How to use theprint/Boptruth-NeuralMonarch-7B with SGLang:
# 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
}'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
}'How to use theprint/Boptruth-NeuralMonarch-7B with Ollama:
ollama run hf.co/theprint/Boptruth-NeuralMonarch-7B:Q4_K_M
How to use theprint/Boptruth-NeuralMonarch-7B with Unsloth Studio:
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
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
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for theprint/Boptruth-NeuralMonarch-7B to start chatting
How to use theprint/Boptruth-NeuralMonarch-7B with Docker Model Runner:
docker model run hf.co/theprint/Boptruth-NeuralMonarch-7B:Q4_K_M
How to use theprint/Boptruth-NeuralMonarch-7B with Lemonade:
# Download Lemonade from https://lemonade-server.ai/ lemonade pull theprint/Boptruth-NeuralMonarch-7B:Q4_K_M
lemonade run user.Boptruth-NeuralMonarch-7B-Q4_K_M
lemonade list
Boptruth-NeuralMonarch-7B is a merge of the following models using LazyMergekit:
If you use standard ChatML, you may end up with <|im_end|> tokens at the end of responses.
Find quantized versions of this model right here.
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
!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"])