Downloads · 30 days
9
13% of all-time downloads
Noumaan/phi3-mini-128k-instruct-4bit-quantized
phi3-mini-128k-instruct-4bit-quantized is a text generation model from Noumaan. Use it when you need the model to write or continue text. It is set up for transformers.
This model is a 4-bit quantized version of the Phi-3-mini-128k-instruct model, optimized for efficient inference while maintaining performance.
Downloads · 30 days
9
13% of all-time downloads
All-time downloads
69
Public
Parameters
3.9B
2.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2.4 GB · 100%
How the weights are stored.
U83.6B · 93%
From the Hugging Face model README
This model is a 4-bit quantized version of the Phi-3-mini-128k-instruct model, optimized for efficient inference while maintaining performance.
This model is a 4-bit quantized version of the Phi-3-mini-128k-instruct model. It uses the bitsandbytes library for quantization, allowing for reduced memory usage and faster inference times while aiming to maintain most of the original model's performance.
This model can be used for various natural language processing tasks such as text generation, completion, and question-answering. It's particularly suitable for deployment in resource-constrained environments or for applications requiring faster inference times.
This model should not be used for any malicious purposes or to generate harmful content. It's not suitable for tasks requiring extremely high precision or for making critical decisions without human oversight.
Users should be aware of the quantization's impact on model performance and validate the model's outputs for their specific use case. It's recommended to compare results with the full-precision model for critical applications.
## How to Get Started with the Model
This model is pre-quantized to 4-bit precision. You can load and use it directly without additional quantization:
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_name = "your-username/phi3-mini-128k-instruct-4bit-quantized"
model = AutoModelForCausalLM.from_pretrained(
model_name,
device_map="auto",
torch_dtype=torch.float16
)
tokenizer = AutoTokenizer.from_pretrained(model_name)
# Example usage
input_text = "What is the capital of France?"
inputs = tokenizer(input_text, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=50)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))