Downloads · 30 days
0
navgod/Gemma-2-9b-translator
Gemma-2-9b-translator is a machine learning model from navgod. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers.
This model is based on the GEMMA-2 architecture and is fine-tuned specifically to improve YouTube auto-generated captions. It post-processes the captions by correcting misaligned words that occur due to phonetic simil…
Downloads · 30 days
0
Access
Public
Updated Oct 3, 2024
Repo size
38.6 MB
Likes
0
Public
Click a slice to open those files.
.json34.4 MB · 89%
From the Hugging Face model README
This model is based on the GEMMA-2 architecture and is fine-tuned specifically to improve YouTube auto-generated captions. It post-processes the captions by correcting misaligned words that occur due to phonetic similarities but do not fit the context. The model is designed to enhance the quality of speech-to-text output, making the captions more accurate and readable by identifying and fixing contextually incorrect words with similar pronunciations.
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
This model can be directly applied to improve the quality of YouTube auto-generated captions by post-processing them. Without any additional fine-tuning, the model can correct phonetically similar words that are incorrectly transcribed but out of context, resulting in more accurate and contextually appropriate captions. Users can input raw captions generated from YouTube videos, and the model will output refined, corrected text.
The model is not designed for general-purpose language correction, grammar checking, or tasks unrelated to phonetic error correction in captions. It is not suitable for handling highly technical or specialized language that it has not been trained on, nor for correcting non-phonetically related errors in transcriptions. Misuse could include attempts to employ the model for purposes such as translation, sentiment analysis, or plagiarism detection, which are beyond its intended scope.
The model may exhibit biases inherent in the dataset used during training, including but not limited to regional accents, linguistic variations, and dialects. The correction capability may also perform unevenly across different languages or types of content. Additionally, the model may struggle with extremely noisy audio or highly specialized terminology not present in the training data.
It is recommended that users be aware of potential biases toward certain accents or dialects. Testing the model on a diverse range of speech inputs can help evaluate its effectiveness across various demographics. In cases where specific speech patterns or accents are frequent, further fine-tuning may be required to mitigate these biases. Users should also remain mindful of the limitations in correcting technical jargon or highly specialized content that the model has not been trained on.
Use the code below to get started with the model. https://colab.research.google.com/drive/1AJ9s_wZNXxvco79J_X_s-U60OqC3Fa02?usp=sharing
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
AutoModelForSeq2SeqLM,
BitsAndBytesConfig
)
import torch
from peft import PeftModel, PeftConfig
peft_model_id = "navgod/Gemma-2-9b-translator"
config = PeftConfig.from_pretrained(peft_model_id)
model = AutoModelForCausalLM.from_pretrained(peft_model_id)
model = PeftModel.from_pretrained(model, peft_model_id)
tokenizer = AutoTokenizer.from_pretrained(config.base_model_name_or_path)
model = model.to("cuda")
https://huggingface.co/datasets/jesscusi/english-slang
from peft import LoraConfig
peft_config = LoraConfig(
r=16,
lora_alpha=32,
target_modules=["gate_proj", "up_proj", "down_proj"],
lora_dropout=0.2,
bias="none",
task_type="CAUSAL_LM",
)
training_arguments = TrainingArguments(
output_dir=new_model,
per_device_train_batch_size=4,
per_device_eval_batch_size=1,
gradient_accumulation_steps=2,
optim="adamw_torch",
num_train_epochs=1,
eval_strategy="steps",
eval_steps=0.2,
logging_steps=1,
warmup_steps=10,
logging_strategy="steps",
learning_rate=2e-4,
fp16=False,
bf16=False,
group_by_length=True,
report_to="wandb"
)
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
BibTeX:
[More Information Needed]
APA:
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]