Downloads · 30 days
359
11% of all-time downloads
RichardErkhov/ndebuhr_-_Mistral-7B-Technical-Tutorial-Summarization-QLoRA-gguf
ndebuhr_-_Mistral-7B-Technical-Tutorial-Summarization-QLoRA-gguf is a machine learning model from RichardErkhov. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
359
11% of all-time downloads
All-time downloads
3.3K
Public
Repo size
82.2 GB
Likes
0
Public
Click a slice to open those files.
.gguf95.2 GB · 100%
From the Hugging Face model README
Quantization made by Richard Erkhov.
Mistral-7B-Technical-Tutorial-Summarization-QLoRA - GGUF
language:
Used a private dataset with hundreds of technical tutorials and associated summaries.
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
import torch
input_text = ""
# Set device based on CUDA availability
device = "cuda" if torch.cuda.is_available() else "cpu"
# Load the model and tokenizer
model_name = "ndebuhr/Mistral-7B-Technical-Tutorial-Summarization-QLoRA"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name).to(device)
instruction = "Clarify and summarize this tutorial transcript"
prompt = """{}
### Raw Transcript:
{}
### Summary:
"""
# Tokenize the input text
inputs = tokenizer(
prompt.format(instruction, input_text),
return_tensors="pt",
truncation=True,
max_length=16384
).to(device)
# Generate outputs
outputs = model.generate(
**inputs,
max_length=16384,
num_return_sequences=1,
use_cache=True
)
# Decode the generated text
generated_text = tokenizer.batch_decode(outputs, skip_special_tokens=True)
This mistral model was trained 2x faster with Unsloth and Huggingface's TRL library.