Instructions to use QuantFactory/Not-WizardLM-2-7B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use QuantFactory/Not-WizardLM-2-7B-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="QuantFactory/Not-WizardLM-2-7B-GGUF", filename="Not-WizardLM-2-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/Not-WizardLM-2-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/Not-WizardLM-2-7B-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/Not-WizardLM-2-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/Not-WizardLM-2-7B-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/Not-WizardLM-2-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/Not-WizardLM-2-7B-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf QuantFactory/Not-WizardLM-2-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/Not-WizardLM-2-7B-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf QuantFactory/Not-WizardLM-2-7B-GGUF:Q4_K_M
Use Docker
docker model run hf.co/QuantFactory/Not-WizardLM-2-7B-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use QuantFactory/Not-WizardLM-2-7B-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "QuantFactory/Not-WizardLM-2-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/Not-WizardLM-2-7B-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/QuantFactory/Not-WizardLM-2-7B-GGUF:Q4_K_M
- Ollama
How to use QuantFactory/Not-WizardLM-2-7B-GGUF with Ollama:
ollama run hf.co/QuantFactory/Not-WizardLM-2-7B-GGUF:Q4_K_M
- Unsloth Studio new
How to use QuantFactory/Not-WizardLM-2-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/Not-WizardLM-2-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/Not-WizardLM-2-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/Not-WizardLM-2-7B-GGUF to start chatting
- Docker Model Runner
How to use QuantFactory/Not-WizardLM-2-7B-GGUF with Docker Model Runner:
docker model run hf.co/QuantFactory/Not-WizardLM-2-7B-GGUF:Q4_K_M
- Lemonade
How to use QuantFactory/Not-WizardLM-2-7B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull QuantFactory/Not-WizardLM-2-7B-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Not-WizardLM-2-7B-GGUF-Q4_K_M
List all available models
lemonade list
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama-server -hf QuantFactory/Not-WizardLM-2-7B-GGUF:# Run inference directly in the terminal:
llama-cli -hf QuantFactory/Not-WizardLM-2-7B-GGUF: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/Not-WizardLM-2-7B-GGUF:# Run inference directly in the terminal:
./llama-cli -hf QuantFactory/Not-WizardLM-2-7B-GGUF: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/Not-WizardLM-2-7B-GGUF:# Run inference directly in the terminal:
./build/bin/llama-cli -hf QuantFactory/Not-WizardLM-2-7B-GGUF:Use Docker
docker model run hf.co/QuantFactory/Not-WizardLM-2-7B-GGUF:QuantFactory/Not-WizardLM-2-7B-GGUF
This is quantized version of amazingvince/Not-WizardLM-2-7B created using llama.cpp
Model Description
Included is code ripped from fastchat with the expected chat templating.
Also wiz.pdf is a pdf of the github blog showing the apache 2 release. Link to wayback machine included: https://web.archive.org/web/20240415221214/https://wizardlm.github.io/WizardLM2/
example
import dataclasses
from enum import auto, Enum
from typing import List, Tuple, Any
class SeparatorStyle(Enum):
"""Different separator style."""
SINGLE = auto()
TWO = auto()
@dataclasses.dataclass
class Conversation:
"""A class that keeps all conversation history."""
system: str
roles: List[str]
messages: List[List[str]]
offset: int
sep_style: SeparatorStyle = SeparatorStyle.SINGLE
sep: str = "###"
sep2: str = None
# Used for gradio server
skip_next: bool = False
conv_id: Any = None
def get_prompt(self):
if self.sep_style == SeparatorStyle.SINGLE:
ret = self.system
for role, message in self.messages:
if message:
ret += self.sep + " " + role + ": " + message
else:
ret += self.sep + " " + role + ":"
return ret
elif self.sep_style == SeparatorStyle.TWO:
seps = [self.sep, self.sep2]
ret = self.system + seps[0]
for i, (role, message) in enumerate(self.messages):
if message:
ret += role + ": " + message + seps[i % 2]
else:
ret += role + ":"
return ret
else:
raise ValueError(f"Invalid style: {self.sep_style}")
def append_message(self, role, message):
self.messages.append([role, message])
def to_gradio_chatbot(self):
ret = []
for i, (role, msg) in enumerate(self.messages[self.offset:]):
if i % 2 == 0:
ret.append([msg, None])
else:
ret[-1][-1] = msg
return ret
def copy(self):
return Conversation(
system=self.system,
roles=self.roles,
messages=[[x, y] for x, y in self.messages],
offset=self.offset,
sep_style=self.sep_style,
sep=self.sep,
sep2=self.sep2,
conv_id=self.conv_id)
def dict(self):
return {
"system": self.system,
"roles": self.roles,
"messages": self.messages,
"offset": self.offset,
"sep": self.sep,
"sep2": self.sep2,
"conv_id": self.conv_id,
}
conv = Conversation(
system="A chat between a curious user and an artificial intelligence assistant. "
"The assistant gives helpful, detailed, and polite answers to the user's questions.",
roles=("USER", "ASSISTANT"),
messages=[],
offset=0,
sep_style=SeparatorStyle.TWO,
sep=" ",
sep2="</s>",
)
conv.append_message(conv.roles[0], "Why would Microsoft take this down?")
conv.append_message(conv.roles[1], None)
prompt = conv.get_prompt()
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
result = model.generate(**inputs, max_new_tokens=1000)
generated_ids = result[0]
generated_text = tokenizer.decode(generated_ids, skip_special_tokens=True)
print(generated_text)
- Downloads last month
- 66
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
Model tree for QuantFactory/Not-WizardLM-2-7B-GGUF
Base model
amazingvince/Not-WizardLM-2-7B
Install from brew
# Start a local OpenAI-compatible server with a web UI: llama-server -hf QuantFactory/Not-WizardLM-2-7B-GGUF:# Run inference directly in the terminal: llama-cli -hf QuantFactory/Not-WizardLM-2-7B-GGUF: