MCPcopy Create free account

hub / github.com/allenai/OLMoASR / functions

Functions377 in github.com/allenai/OLMoASR

↓ 1 callersFunctionprocess_directory_data
Process all segment directories in the data directory. Args: data_dir: Root directory containing segment subdirectories vide
scripts/data/filtering/gen_video_samples.py:280
↓ 1 callersFunctionprocess_sample_data
Process a random sample of data from samples dictionary file. Args: samples_dicts_file: Path to JSONL file containing sample diction
scripts/data/filtering/gen_video_samples.py:313
↓ 1 callersFunctionprocess_transcript_file
Process a single transcript file and extract metadata. Args: file_path: Path to the transcript file audio_extension: Extensi
scripts/data/processing/text_to_jsonl.py:93
↓ 1 callersFunctionprocess_transcripts_parallel
Process transcript files in parallel. Args: input_files: List of transcript file paths num_processes: Number of processes to
scripts/data/processing/text_to_jsonl.py:257
↓ 1 callersFunctionprocess_videos
Process all videos in parallel and return successful results. Args: video_seg_list: List of video processing information tuples
scripts/data/filtering/gen_video_samples.py:360
↓ 1 callersMethodqkv_attention
( self, q: Tensor, k: Tensor, v: Tensor, mask: Optional[Tensor] = None )
olmoasr/inf_model.py:172
↓ 1 callersMethodqkv_attention
Compute attention using manual Q, K, V computation. Parameters ---------- q : Tensor Query tenso
olmoasr/model.py:347
↓ 1 callersFunctionread_file_in_tar
Read and extract a specific file from a .tar.gz archive. Args: tar_gz_path: Path to the .tar.gz archive file file_in_tar: Pa
olmoasr/utils.py:814
↓ 1 callersMethodread_srt
Read an SRT file or string. Args: file_path: Path to the SRT file transcript_string: SRT transcript as a string
olmoasr/utils.py:263
↓ 1 callersMethodread_vtt
Read a WebVTT file. Args: file_path: Path to the WebVTT file transcript_string: WebVTT content as string Ret
olmoasr/utils.py:249
↓ 1 callersFunctionremove_ignore_keys_
(state_dict)
demo/convert_openai_to_hf.py:96
↓ 1 callersFunctionrename_keys
(s_dict)
demo/convert_openai_to_hf.py:126
↓ 1 callersFunctionreseg_data
Resegment dataset based on duration constraints. Groups consecutive utterances from the same speaker/source into segments that don't exc
scripts/data/processing/reseg_yodas.py:247
↓ 1 callersFunctionrun_parallel_processing
Execute a function in parallel with progress tracking. Args: func: Function to execute in parallel argument_list: List of ar
scripts/data/filtering/process_tagged_data.py:75
↓ 1 callersFunctionrun_parallel_processing
Execute a function in parallel with progress tracking. Args: func: Function to execute in parallel argument_list: List of ar
scripts/data/filtering/data_tagger.py:87
↓ 1 callersFunctionsave_percentiles
Save percentiles to a JSON file. Args: percentiles: List of percentile values to save output_path: Path where to save the pe
scripts/data/filtering/reservoir_sample.py:333
↓ 1 callersFunctionsave_processed_jsonl
Save processed JSONL data to a compressed file. Args: data: List of JSON objects to save output_path: Path where to save the
scripts/data/filtering/assign_audio_lang_data.py:137
↓ 1 callersFunctionserialize_subtitle_content
Convert parsed subtitle content back to string format. Args: subtitle_content: Parsed subtitle object (WebVTT or SRT) Returns:
scripts/data/filtering/process_tagged_data.py:200
↓ 1 callersFunctionsetup
Initializes the distributed process group for FSDP training. Sets the CUDA device for the current process and initializes the NCCL process gr
scripts/training/train_fsdp_timestamps.py:593
↓ 1 callersFunctionsetup
Initializes the distributed process group for DDP training. Sets the CUDA device for the current process and initializes the NCCL process gro
scripts/training/train_timestamps.py:564
↓ 1 callersFunctionsetup_wandb
Sets up Weights and Biases logging for YODAS DDP training. Initializes W&B with comprehensive training configuration and defines custom metri
scripts/training/train_yodas.py:717
↓ 1 callersFunctionsetup_wandb
Sets up Weights and Biases logging for FSDP training. Initializes W&B with comprehensive training configuration and defines custom metrics fo
scripts/training/train_fsdp_timestamps.py:815
↓ 1 callersFunctionsetup_wandb
Sets up the Weights and Biases logging Args: run_id: The run ID exp_name: The experiment name job_type: The type of job
scripts/training/train_timestamps.py:786
↓ 1 callersFunctionsinusoids
This function is from OpenAI's Whisper repository. The original version can be found at: https://github.com/openai/whisper/blob/ba3f3cd54b0e5
olmoasr/inf_model.py:113
↓ 1 callersFunctionsinusoids
This function is from OpenAI's Whisper repository. The original version can be found at: https://github.com/openai/whisper/blob/ba3f3cd54b0e5
olmoasr/model.py:199
↓ 1 callersFunctiontoken_bytes_to_string
(b)
demo/convert_openai_to_hf.py:276
↓ 1 callersFunctiontrain
Main DDP training loop for YODAS with automatic mixed precision. Performs forward pass, backward pass, gradient accumulation, and optional evalua
scripts/training/train_yodas.py:1227
↓ 1 callersFunctiontrain
Main FSDP training loop with automatic mixed precision and distributed training. Performs forward pass, backward pass, gradient accumulation, and
scripts/training/train_fsdp_timestamps.py:1361
↓ 1 callersFunctiontrain
Main training loop with automatic mixed precision and distributed training. Performs forward pass, backward pass, gradient accumulation, and opti
scripts/training/train_timestamps.py:1280
↓ 1 callersFunctiontranscribe
Transcribe an audio file using Whisper Parameters ---------- model: Whisper The Whisper model instance audio: Union[str
olmoasr/transcribe.py:47
↓ 1 callersFunctionunarchive_jsonl_gz
Unarchive a .jsonl.gz file and optionally save the uncompressed content. Args: file_path: Path to the .jsonl.gz file output_
olmoasr/utils.py:858
↓ 1 callersFunctionvalidate
Run validation on multiple HuggingFace speech datasets. Evaluates the FSDP model on validation sets including TED-LIUM, VoxPopuli, Common Voi
scripts/training/train_fsdp_timestamps.py:2122
↓ 1 callersFunctionweighted_avg
(data)
notebooks/gen_error_bars.py:24
↓ 1 callersFunctionword_anomaly_score
(word: dict)
olmoasr/transcribe.py:325
↓ 1 callersFunctionwrite_jsonl_output
Write transcript dictionaries to compressed JSONL file. Args: transcript_dicts: List of transcript metadata dictionaries out
scripts/data/processing/text_to_jsonl.py:226
Method__getitem__
Get a single sample from the dataset. Args: idx: Sample index Returns: Tuple of (video_id, audio_ar
scripts/data/filtering/tag_audio_lang.py:75
Method__getitem__
Get a single sample from the dataset. Dispatches to appropriate method based on the transcription task type. Returns preprocessed aud
scripts/eval/eval.py:1220
Method__getitem__
Get a single sample from the YODAS dataset. Processes both audio and text for YODAS training, including timestamp processing and rand
scripts/training/train_yodas.py:97
Method__getitem__
Get a single sample from the dataset. Returns: Tuple containing: - audio_file: path to audio file - trans
scripts/training/train_fsdp_timestamps.py:115
Method__getitem__
Get a single validation sample. Extracts audio and text from the dataset, handles dataset-specific field names, and preprocesses both
scripts/training/train_fsdp_timestamps.py:1983
Method__getitem__
Get a single sample from the dataset. Returns: Tuple containing: - audio_file: path to audio file - trans
scripts/training/train_timestamps.py:86
Method__init__
Initialize the shared counter. Args: initial_value: Starting value for the counter (default: 0)
scripts/data/filtering/reservoir_sample.py:71
Method__init__
Initialize the dataset. Args: data: List of transcript segment dictionaries containing audio file paths
scripts/data/filtering/tag_audio_lang.py:51
Method__init__
Initialize the dataset loader with root directory. Args: root_dir (str): Path to the root directory containing dataset files
scripts/eval/eval.py:297
Method__init__
Initialize the evaluation dataset. Sets up the appropriate dataset loader based on the evaluation set and task type. Handles both Hug
scripts/eval/eval.py:1031
Method__init__
Initialize the YODAS dataset. Args: hf_dataset: HuggingFace dataset with YODAS format samples n_text_ctx: Maximum tex
scripts/training/train_yodas.py:76
Method__init__
( self, samples: List[Dict], n_text_ctx: int, n_head: int, )
scripts/training/train_fsdp_timestamps.py:102
Method__init__
Initialize validation dataset. Args: n_text_ctx: Maximum number of text context tokens val_set: Name of the HuggingFa
scripts/training/train_fsdp_timestamps.py:1938
Method__init__
( self, samples: List[Dict], n_text_ctx: int, n_head: int, )
scripts/training/train_timestamps.py:73
Method__init__
Initialize TranscriptReader with either file path or transcript string. Args: file_path: Path to transcript file tran
olmoasr/utils.py:182
Method__init__
Initialize a Segment object. Args: subtitle_file: Path to the subtitle file seg_content: Content of the segm
olmoasr/utils.py:534
Method__init__
Initialize a MachineSegment object. Args: subtitle_file: Path to the subtitle file seg_content: Content of t
olmoasr/utils.py:624
Method__init__
Initialize a SegmentCounter object. Args: segment_count: Total number of valid segments processed over_30_li
olmoasr/utils.py:672
Method__init__
( self, in_channels: int, out_channels: int, kernel_size: int, stride:
olmoasr/inf_model.py:74
Method__init__
(self, n_state: int, n_head: int)
olmoasr/inf_model.py:142
Method__init__
(self, n_state: int, n_head: int, cross_attention: bool = False)
olmoasr/inf_model.py:210
Method__init__
( self, n_mels: int, n_ctx: int, n_state: int, n_head: int, n_layer: int )
olmoasr/inf_model.py:252
Method__init__
( self, n_vocab: int, n_ctx: int, n_state: int, n_head: int, n_layer: int )
olmoasr/inf_model.py:297
Method__init__
(self, dims: ModelDimensions)
olmoasr/inf_model.py:376
Method__init__
Initialize 1D convolution layer with Kaiming normal initialization. Parameters ---------- in_channels : int
olmoasr/model.py:115
Method__init__
Initialize multi-head attention layer. Parameters ---------- n_state : int Dimension of the mode
olmoasr/model.py:244
Method__init__
Initialize residual attention block. Parameters ---------- n_state : int Dimension of the model
olmoasr/model.py:456
Method__init__
Initialize audio encoder. Parameters ---------- n_mels : int Number of mel-frequency channels
olmoasr/model.py:542
Method__init__
Initialize text decoder. Parameters ---------- n_vocab : int Vocabulary size n_ctx : int
olmoasr/model.py:639
Method__init__
Initialize OLMoASR model. Parameters ---------- dims : ModelDimensions Model dimensions configur
olmoasr/model.py:789
Method__len__
Return the number of samples in the dataset.
scripts/data/filtering/tag_audio_lang.py:71
Method__len__
Return the number of samples in the dataset. Returns: int: Total number of audio samples available for evaluation Note:
scripts/eval/eval.py:1206
Method__len__
Return the number of samples in the dataset.
scripts/training/train_yodas.py:93
Method__len__
(self)
scripts/training/train_fsdp_timestamps.py:112
Method__len__
Return the number of samples in the validation dataset.
scripts/training/train_fsdp_timestamps.py:1979
Method__len__
(self)
scripts/training/train_timestamps.py:83
Method_conv_forward
( self, x: Tensor, weight: Tensor, bias: Optional[Tensor] )
olmoasr/inf_model.py:104
Method_conv_forward
Forward convolution with dtype casting. Parameters ---------- x : Tensor Input tensor we
olmoasr/model.py:173
Method_format_timestamp
Format timestamp components into HH:MM:SS.mmm format.
olmoasr/utils.py:209
Functionanalyze_text_casing
Analyze the casing pattern of subtitle content. Args: content_dict: Dictionary containing content iterator and length Returns:
scripts/data/filtering/data_tagger.py:440
Functionassign_language_tag
Add language tag to a sample dictionary. Args: sample_dict: Original sample dictionary language_id: Identified language code
scripts/data/filtering/tag_audio_lang.py:171
Functioncalculate_edit_distance
Calculate edit distance between manual and machine text. Args: content_dict: Dictionary containing manual and machine text n
scripts/data/filtering/data_tagger.py:289
Functioncalculate_wer
Calculate the Word Error Rate (WER) between two strings. Args: pair: Tuple of (reference_text, hypothesis_text) Returns: Wor
olmoasr/utils.py:376
Functioncheck_comma_period_presence
Check if content contains both commas and periods. Args: content_dict: Dictionary containing content iterator and length Return
scripts/data/filtering/data_tagger.py:551
Functioncheck_proper_capitalization
Check if content has proper capitalization after punctuation. Args: content_dict: Dictionary containing content iterator and length
scripts/data/filtering/data_tagger.py:640
Functionchunk_gcs
Segment audio and transcript files from Google Cloud Storage tar.gz archives. Processes files stored in tar.gz archives on GCS by extracting
olmoasr/preprocess.py:918
Functionchunk_local
Segment local audio and transcript files into chunks. Processes local files by reading the transcript and segmenting both audio and tran
olmoasr/preprocess.py:846
Methodconvert_to_token_idx
Convert a single timestamp to token index.
scripts/training/train_yodas.py:212
Functioncount_words
Count the total number of words in content. Args: content_dict: Dictionary containing content iterator Returns: Tuple o
scripts/data/filtering/data_tagger.py:682
Functiondecode_sample
(sample: Dict[str, bytes])
notebooks/wds_explore.py:47
Functiondetect_repeating_lines
Detect if content has repeating lines. Args: content_dict: Dictionary containing content iterator and length Returns: T
scripts/data/filtering/data_tagger.py:582
Methoddevice
(self)
olmoasr/inf_model.py:411
Methodembed_audio
(self, mel: torch.Tensor)
olmoasr/inf_model.py:394
Methodembed_audio
Embed audio features using the encoder. Parameters ---------- mel : torch.Tensor Mel spectrogram
olmoasr/model.py:815
Methodforward
(self, x: Tensor)
olmoasr/inf_model.py:26
Methodforward
( self, x: Tensor, xa: Optional[Tensor] = None, mask: Optional[Tensor] = None,
olmoasr/inf_model.py:150
Methodforward
( self, x: Tensor, xa: Optional[Tensor] = None, mask: Optional[Tensor] = None,
olmoasr/inf_model.py:227
Methodforward
x : torch.Tensor, shape = (batch_size, n_mels, n_ctx) the mel spectrogram of the audio
olmoasr/inf_model.py:265
Methodforward
x : torch.LongTensor, shape = (batch_size, <= n_ctx) the text tokens xa : torch.Tensor, shape = (batch_size, n_audio_ctx,
olmoasr/inf_model.py:320
Methodforward
( self, mel: torch.Tensor, tokens: torch.Tensor, padding_mask: torch.Tensor = None )
olmoasr/inf_model.py:405
Methodforward
Forward pass through layer normalization. Parameters ---------- x : Tensor Input tensor to norma
olmoasr/model.py:25
Methodforward
Forward pass through multi-head attention. Parameters ---------- x : Tensor Input tensor for que
olmoasr/model.py:266
Methodforward
Forward pass through residual attention block. Parameters ---------- x : Tensor Input tensor
olmoasr/model.py:485
Methodforward
Forward pass through audio encoder. Parameters ---------- x : torch.Tensor, shape = (batch_size, n_mels, n_c
olmoasr/model.py:571
Methodforward
Forward pass through text decoder. Parameters ---------- x : torch.LongTensor, shape = (batch_size, <= n_ctx
olmoasr/model.py:688
← previousnext →201–300 of 377, ranked by callers