Downloads · 30 days
107
13% of all-time downloads
SandLogicTechnologies/Phi-3.1-mini-4k-instruct-GGUF
Phi-3.1-mini-4k-instruct-GGUF is a text generation model from SandLogicTechnologies. Use it when you need the model to write or continue text.
We have quantized the Phi-3.1-mini-4k-instruct model into three variants:
Downloads · 30 days
107
13% of all-time downloads
All-time downloads
816
Public
Repo size
7.3 GB
Likes
2
Public
Click a slice to open those files.
.gguf7.3 GB · 100%
From the Hugging Face model README
We have quantized the Phi-3.1-mini-4k-instruct model into three variants:
These quantized models offer improved efficiency while maintaining performance.
Discover our full range of quantized language models by visiting our SandLogic Lexicon GitHub. To learn more about our company and services, check out our website at SandLogic.
The Phi-3.1-mini-4k-instruct model is designed for a variety of commercial and research applications, particularly in environments with limited memory or computational resources, scenarios requiring low latency, and tasks involving robust reasoning capabilities, such as mathematics and logic.
The model's key capabilities include:
We offer three quantized versions of the Phi-3.1-mini-4k-instruct model:
These quantized models aim to reduce model size and improve inference speed while maintaining performance as close to the original model as possible.
pip install llama-cpp-python
Please refer to the llama-cpp-python documentation to install with GPU support.
Here's an example demonstrating how to use the high-level API for basic text completion:
from llama_cpp import Llama
llm = Llama(
model_path="./Phi-3-mini-4k-instruct-q4.gguf", # path to GGUF file
n_ctx=4096, # The max sequence length to use - note that longer sequence lengths require much more resources
n_threads=8, # The number of CPU threads to use, tailor to your system and the resulting performance
n_gpu_layers=35, # The number of layers to offload to GPU, if you have GPU acceleration available. Set to 0 if no GPU acceleration is available on your system.
)
prompt = "How to explain Internet to a medieval knight?"
# Simple inference example
output = llm(
f"<|user|>\n{prompt}<|end|>\n<|assistant|>",
max_tokens=256, # Generate up to 256 tokens
stop=["<|end|>"],
echo=True, # Whether to echo the prompt
)
print(output['choices'][0]['text'])
You can download Llama models in gguf format directly from Hugging Face using the from_pretrained method. This feature requires the huggingface-hub package.
To install it, run: pip install huggingface-hub
from llama_cpp import Llama
llm = Llama.from_pretrained(
repo_id="SandLogicTechnologies/Phi-3.1-mini-4k-instruct-GGUF",
filename="*Phi-3.1-mini-4k-instruct-Q5_K_M.gguf",
verbose=False
)
By default, from_pretrained will download the model to the Hugging Face cache directory. You can manage installed model files using the huggingface-cli tool.
Phi-3-mini-4k-instruct license - Phi-3
We thank the Microsoft team for developing and releasing the original Phi-3.1-mini-4k-instruct model. Special thanks to Georgi Gerganov and the entire llama.cpp development team for their outstanding contributions.
For any inquiries or support, please contact us at [email protected] or visit our support page.