Downloads · 30 days
94
5% of all-time downloads
alokabhishek/Mistral-7B-Instruct-v0.2-GGUF
Mistral-7B-Instruct-v0.2-GGUF is a text generation model from alokabhishek. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This repo GGUF quantized version of Mistral AI's Mistral-7B-Instruct-v0.2 model using llama.cpp.
Downloads · 30 days
94
5% of all-time downloads
All-time downloads
1.8K
Public
Repo size
9.5 GB
Likes
2
Public
Click a slice to open those files.
.gguf9.5 GB · 100%
From the Hugging Face model README
This repo GGUF quantized version of Mistral AI_'s Mistral-7B-Instruct-v0.2 model using llama.cpp.
Use the code below to get started with the model.
# Base ctransformers with CUDA GPU acceleration
! pip install ctransformers[cuda]>=0.2.24
# Or with no GPU acceleration
# ! pip install ctransformers>=0.2.24
! pip install -U sentence-transformers
! pip install transformers huggingface_hub torch
from ctransformers import AutoModelForCausalLM
from transformers import pipeline, AutoModel, AutoTokenizer
from sentence_transformers import SentenceTransformer
import os
# Load LLM and Tokenizer
model_mistral = AutoModelForCausalLM.from_pretrained(
"alokabhishek/Mistral-7B-Instruct-v0.2-GGUF",
model_file="mistral-7b-instruct-v0.2.Q4_K_M.gguf", # replace Q4_K_M.gguf with Q5_K_M.gguf as needed
model_type="mistral",
gpu_layers=50, # Use `gpu_layers` to specify how many layers will be offloaded to the GPU.
hf=True
)
tokenizer_mistral = AutoTokenizer.from_pretrained(
"alokabhishek/Mistral-7B-Instruct-v0.2-GGUF", use_fast=True
)
# Create a pipeline
pipe_mistral = pipeline(model=model_mistral, tokenizer=tokenizer_mistral, task='text-generation')
prompt_mistral = "Tell me a funny joke about Large Language Models meeting a Blackhole in an intergalactic Bar."
output_mistral = pipe_mistral(prompt_mistral, max_new_tokens=512)
print(output_mistral[0]["generated_text"])
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]