CoolFace
Modelpublic

Dc-4nderson/transcript_summarizer_model

sourceHugging Facemitupdated 11mo agoView on Hugging Face
0likes5downloads
Model Card

๐Ÿง  Mistral LoRA Transcript Chunking Model

Model Overview

This LoRA adapter was trained on a custom dataset of 1,000 English transcript examples to teach a Mistral-7B-v0.2 model how to segment long transcripts into topic-based chunks using 'section #:' as delimiters. It enables automated topic boundary detection in conversation, meeting, and podcast transcripts โ€” ideal for preprocessing before summarization, classification, or retrieval.


๐Ÿงฉ Training Objective

The model learns to:

  • โ€”Detect topic changes in unstructured transcripts
  • โ€”Insert -- where those shifts occur
  • โ€”Preserve the original flow of speech

Example:


โš™๏ธ Training Configuration

  • โ€”Base Model: mistralai/Mistral-7B-v0.2
  • โ€”Adapter Type: LoRA
  • โ€”PEFT Library: peft==0.10.0
  • โ€”Training Framework: Hugging Face Transformers
  • โ€”Epochs: 2
  • โ€”Optimizer: AdamW
  • โ€”Learning Rate: 2e-4
  • โ€”Batch Size: 8
  • โ€”Sequence Length: 512

๐Ÿ“Š Training Metrics

StepTraining LossValidation LossEntropyNum TokensMean Token Accuracy
1000.29610.16030.1644204,8000.9594
2000.13620.15020.1609409,6000.9603
3000.13600.14510.1391612,8640.9572
4000.09510.13510.1279817,6640.9635
5000.09470.12970.08921,022,4640.9657

Summary: Loss steadily decreased during training, and accuracy remained consistently above 95%, indicating the model effectively learned transcript reconstruction and accurate delimiter placement.


๐Ÿงฐ Usage Example

python
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel

base = "mistralai/Mistral-7B-Instruct-v0.2"
adapter = "Dc-4nderson/transcript_summarizer_model"

tokenizer = AutoTokenizer.from_pretrained(base)
model = AutoModelForCausalLM.from_pretrained(base)
model = PeftModel.from_pretrained(model, adapter)

text = (
    "Break this transcript wherever a new topic begins. Use 'section #:' as a delimiter.\n"
    "Transcript: Let's start with last week's performance metrics. "
    "Next, weโ€™ll review upcoming campaign deadlines."
)

inputs = tokenizer(text, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=30000)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

๐Ÿงพ License

Released under the MIT License โ€” free for research and commercial use with attribution.

๐Ÿ™Œ Credits

Developed by Dequan Anderson for automated transcript segmentation and chunked text preprocessing tasks. Built using Hugging Face Transformers, PEFT, and Mistral 7B for efficient LoRA fine-tuning.