Downloads · 30 days
23
18% of all-time downloads
olafdil/FrDiarization-Llama-3.1-8B-4bit
FrDiarization-Llama-3.1-8B-4bit is a text generation model from olafdil. Use it when you need the model to write or continue text. The card lists the license as mit.
This is a fine-tuned version of the Meta-Llama-3.1-8B-Instruct-bnb-4bit model, adapted for French multi-speaker diarization tasks. Below, you'll find details about the fine-tuning process, dataset, and how to use this…
Downloads · 30 days
23
18% of all-time downloads
All-time downloads
130
Public
Repo size
32.1 GB
Likes
2
Public
Click a slice to open those files.
.bin16.1 GB · 100%
From the Hugging Face model README
This is a fine-tuned version of the Meta-Llama-3.1-8B-Instruct-bnb-4bit model, adapted for French multi-speaker diarization tasks. Below, you'll find details about the fine-tuning process, dataset, and how to use this model.
q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj.1616The model was fine-tuned on the French_MultiSpeaker_Diarization dataset, hosted on the Hugging Face Hub:
120,0000nonellama-3.1 template).Model Loading:
FastLanguageModel.from_pretrained().Dataset Preparation:
unsloth.chat_templates library.apply_chat_template() to suit the diarization task.Fine-Tuning:
You can load this model directly from Hugging Face:
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "olafdil/FrDiarization-Llama-3.1-8B-4bit"
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype="auto")
tokenizer = AutoTokenizer.from_pretrained(model_name)
template = """
I have an audio transcription where multiple speakers are involved in a conversation.
Your task is to distinguish the different speakers and diarize the text accordingly.
Each speaker's dialogue should be clearly labeled, such as 'Speaker 1:', 'Speaker 2:', etc.
Ensure that the labels remain consistent throughout the transcription and that the text is formatted neatly.
Here's the transcription:
"""
transciption = "Your input transcription here"
prompt = template + transcription
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
The following libraries were used:
transformersdatasetsunslothtorchTo install the dependencies, you can use:
pip install transformers datasets torch unsloth
If you use this model, please consider citing the base model and the dataset: