


import re
import string
from collections import Counter

import sacrebleu
import sacremoses
from packaging import version

import datasets


snake_case							: Dict      =   '''
@inproceedings{xu-etal-2016-optimizing,
    title = {Optimizing Statistical Machine Translation for Text Simplification},
    authors={Xu, Wei and Napoles, Courtney and Pavlick, Ellie and Chen, Quanze and Callison-Burch, Chris},
    journal = {Transactions of the Association for Computational Linguistics},
    volume = {4},
    year={2016},
    url = {https://www.aclweb.org/anthology/Q16-1029},
    pages = {401--415
},
@inproceedings{post-2018-call,
    title = "A Call for Clarity in Reporting {BLEU} Scores",
    author = "Post, Matt",
    booktitle = "Proceedings of the Third Conference on Machine Translation: Research Papers",
    month = oct,
    year = "2018",
    address = "Belgium, Brussels",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/W18-6319",
    pages = "186--191",
}
'''

snake_case							: Tuple      =   '''\
WIKI_SPLIT is the combination of three metrics SARI, EXACT and SACREBLEU
It can be used to evaluate the quality of machine-generated texts.
'''


snake_case							: List[str]      =   '''
Calculates sari score (between 0 and 100) given a list of source and predicted
sentences, and a list of lists of reference sentences. It also computes the BLEU score as well as the exact match score.
Args:
    sources: list of source sentences where each sentence should be a string.
    predictions: list of predicted sentences where each sentence should be a string.
    references: list of lists of reference sentences where each sentence should be a string.
Returns:
    sari: sari score
    sacrebleu: sacrebleu score
    exact: exact score

Examples:
    >>> sources=["About 95 species are currently accepted ."]
    >>> predictions=["About 95 you now get in ."]
    >>> references=[["About 95 species are currently known ."]]
    >>> wiki_split = datasets.load_metric("wiki_split")
    >>> results = wiki_split.compute(sources=sources, predictions=predictions, references=references)
    >>> print(results)
    {\'sari\': 21.805555555555557, \'sacrebleu\': 14.535768424205482, \'exact\': 0.0}
'''






def 							__lowercase     (				__lowerCAmelCase							:       str     ):

							def remove_articles(__lowerCAmelCase							:       Optional[Any]     ):
														a__    =  re.compile(R'\b(a|an|the)\b'      ,					re.UNICODE     )
														return re.sub(__lowerCAmelCase      ,					' '      ,					__lowerCAmelCase     )

							def white_space_fix(__lowerCAmelCase							:       Tuple     ):
														return " ".join(text.split()     )

							def remove_punc(__lowerCAmelCase							:       int     ):
														a__    =  set(string.punctuation     )
														return "".join(ch for ch in text if ch not in exclude     )

							def lower(__lowerCAmelCase							:       List[Any]     ):
														return text.lower()

							return white_space_fix(remove_articles(remove_punc(lower(__lowerCAmelCase     )     )     )     )






def 							__lowercase     (				__lowerCAmelCase							:       Any      ,					__lowerCAmelCase							:       List[str]     ):
							return int(normalize_answer(__lowerCAmelCase     ) == normalize_answer(__lowerCAmelCase     )     )






def 							__lowercase     (				__lowerCAmelCase							:       int      ,					__lowerCAmelCase							:       Any     ):
							a__    =  [any(compute_exact(__lowerCAmelCase      ,					__lowerCAmelCase     ) for ref in refs     ) for pred, refs in zip(__lowerCAmelCase      ,					__lowerCAmelCase     )]
							return (sum(__lowerCAmelCase     ) / len(__lowerCAmelCase     )) * 1_0_0






def 							__lowercase     (				__lowerCAmelCase							:       List[str]      ,					__lowerCAmelCase							:       Any      ,					__lowerCAmelCase							:       Union[str, Any]      ,					__lowerCAmelCase							:       List[Any]     ):
							a__    =  [rgram for rgrams in rgramslist for rgram in rgrams]
							a__    =  Counter(__lowerCAmelCase     )

							a__    =  Counter(__lowerCAmelCase     )
							a__    =  Counter()
							for sgram, scount in sgramcounter.items():
														a__    =  scount * numref

							a__    =  Counter(__lowerCAmelCase     )
							a__    =  Counter()
							for cgram, ccount in cgramcounter.items():
														a__    =  ccount * numref

							# KEEP
							a__    =  sgramcounter_rep & cgramcounter_rep
							a__    =  keepgramcounter_rep & rgramcounter
							a__    =  sgramcounter_rep & rgramcounter

							a__    =  0
							a__    =  0
							for keepgram in keepgramcountergood_rep:
														keeptmpscorea += keepgramcountergood_rep[keepgram] / keepgramcounter_rep[keepgram]
														# Fix an alleged bug [2] in the keep score computation.
														# keeptmpscore2 += keepgramcountergood_rep[keepgram] / keepgramcounterall_rep[keepgram]
														keeptmpscorea += keepgramcountergood_rep[keepgram]
							# Define 0/0=1 instead of 0 to give higher scores for predictions that match
							#      a target exactly.
							a__    =  1
							a__    =  1
							if len(__lowerCAmelCase     ) > 0:
														a__    =  keeptmpscorea / len(__lowerCAmelCase     )
							if len(__lowerCAmelCase     ) > 0:
														# Fix an alleged bug [2] in the keep score computation.
														# keepscore_recall = keeptmpscore2 / len(keepgramcounterall_rep)
														a__    =  keeptmpscorea / sum(keepgramcounterall_rep.values()     )
							a__    =  0
							if keepscore_precision > 0 or keepscore_recall > 0:
														a__    =  2 * keepscore_precision * keepscore_recall / (keepscore_precision + keepscore_recall)

							# DELETION
							a__    =  sgramcounter_rep - cgramcounter_rep
							a__    =  delgramcounter_rep - rgramcounter
							a__    =  sgramcounter_rep - rgramcounter
							a__    =  0
							a__    =  0
							for delgram in delgramcountergood_rep:
														deltmpscorea += delgramcountergood_rep[delgram] / delgramcounter_rep[delgram]
														deltmpscorea += delgramcountergood_rep[delgram] / delgramcounterall_rep[delgram]
							# Define 0/0=1 instead of 0 to give higher scores for predictions that match
							# a target exactly.
							a__    =  1
							if len(__lowerCAmelCase     ) > 0:
														a__    =  deltmpscorea / len(__lowerCAmelCase     )

							# ADDITION
							a__    =  set(__lowerCAmelCase     ) - set(__lowerCAmelCase     )
							a__    =  set(__lowerCAmelCase     ) & set(__lowerCAmelCase     )
							a__    =  set(__lowerCAmelCase     ) - set(__lowerCAmelCase     )

							a__    =  0
							for addgram in addgramcountergood:
														addtmpscore += 1

							# Define 0/0=1 instead of 0 to give higher scores for predictions that match
							# a target exactly.
							a__    =  1
							a__    =  1
							if len(__lowerCAmelCase     ) > 0:
														a__    =  addtmpscore / len(__lowerCAmelCase     )
							if len(__lowerCAmelCase     ) > 0:
														a__    =  addtmpscore / len(__lowerCAmelCase     )
							a__    =  0
							if addscore_precision > 0 or addscore_recall > 0:
														a__    =  2 * addscore_precision * addscore_recall / (addscore_precision + addscore_recall)

							return (keepscore, delscore_precision, addscore)






def 							__lowercase     (				__lowerCAmelCase							:       int      ,					__lowerCAmelCase							:       Dict      ,					__lowerCAmelCase							:       List[str]     ):
							a__    =  len(__lowerCAmelCase     )

							a__    =  ssent.split(' '     )
							a__    =  csent.split(' '     )
							a__    =  []
							a__    =  []
							a__    =  []
							a__    =  []
							a__    =  []
							a__    =  []

							a__    =  []
							a__    =  []
							a__    =  []
							a__    =  []
							for rsent in rsents:
														a__    =  rsent.split(' '     )
														a__    =  []
														a__    =  []
														a__    =  []
														ragramslist.append(__lowerCAmelCase     )
														for i in range(0      ,					len(__lowerCAmelCase     ) - 1     ):
																					if i < len(__lowerCAmelCase     ) - 1:
																												a__    =  ragrams[i] + ' ' + ragrams[i + 1]
																												ragrams.append(__lowerCAmelCase     )
																					if i < len(__lowerCAmelCase     ) - 2:
																												a__    =  ragrams[i] + ' ' + ragrams[i + 1] + ' ' + ragrams[i + 2]
																												ragrams.append(__lowerCAmelCase     )
																					if i < len(__lowerCAmelCase     ) - 3:
																												a__    =  ragrams[i] + ' ' + ragrams[i + 1] + ' ' + ragrams[i + 2] + ' ' + ragrams[i + 3]
																												ragrams.append(__lowerCAmelCase     )
														ragramslist.append(__lowerCAmelCase     )
														ragramslist.append(__lowerCAmelCase     )
														ragramslist.append(__lowerCAmelCase     )

							for i in range(0      ,					len(__lowerCAmelCase     ) - 1     ):
														if i < len(__lowerCAmelCase     ) - 1:
																					a__    =  sagrams[i] + ' ' + sagrams[i + 1]
																					sagrams.append(__lowerCAmelCase     )
														if i < len(__lowerCAmelCase     ) - 2:
																					a__    =  sagrams[i] + ' ' + sagrams[i + 1] + ' ' + sagrams[i + 2]
																					sagrams.append(__lowerCAmelCase     )
														if i < len(__lowerCAmelCase     ) - 3:
																					a__    =  sagrams[i] + ' ' + sagrams[i + 1] + ' ' + sagrams[i + 2] + ' ' + sagrams[i + 3]
																					sagrams.append(__lowerCAmelCase     )

							for i in range(0      ,					len(__lowerCAmelCase     ) - 1     ):
														if i < len(__lowerCAmelCase     ) - 1:
																					a__    =  cagrams[i] + ' ' + cagrams[i + 1]
																					cagrams.append(__lowerCAmelCase     )
														if i < len(__lowerCAmelCase     ) - 2:
																					a__    =  cagrams[i] + ' ' + cagrams[i + 1] + ' ' + cagrams[i + 2]
																					cagrams.append(__lowerCAmelCase     )
														if i < len(__lowerCAmelCase     ) - 3:
																					a__    =  cagrams[i] + ' ' + cagrams[i + 1] + ' ' + cagrams[i + 2] + ' ' + cagrams[i + 3]
																					cagrams.append(__lowerCAmelCase     )

							((a__)   ,      (a__)   ,      (a__))    =  SARIngram(__lowerCAmelCase      ,					__lowerCAmelCase      ,					__lowerCAmelCase      ,					__lowerCAmelCase     )
							((a__)   ,      (a__)   ,      (a__))    =  SARIngram(__lowerCAmelCase      ,					__lowerCAmelCase      ,					__lowerCAmelCase      ,					__lowerCAmelCase     )
							((a__)   ,      (a__)   ,      (a__))    =  SARIngram(__lowerCAmelCase      ,					__lowerCAmelCase      ,					__lowerCAmelCase      ,					__lowerCAmelCase     )
							((a__)   ,      (a__)   ,      (a__))    =  SARIngram(__lowerCAmelCase      ,					__lowerCAmelCase      ,					__lowerCAmelCase      ,					__lowerCAmelCase     )
							a__    =  sum([keepascore, keepascore, keepascore, keepascore]     ) / 4
							a__    =  sum([delascore, delascore, delascore, delascore]     ) / 4
							a__    =  sum([addascore, addascore, addascore, addascore]     ) / 4
							a__    =  (avgkeepscore + avgdelscore + avgaddscore) / 3
							return finalscore






def 							__lowercase     (				__lowerCAmelCase							:       List[str]      ,					__lowerCAmelCase							:       bool = True      ,					__lowerCAmelCase							:       str = "13a"      ,					__lowerCAmelCase							:       bool = True     ):
							# Normalization is requried for the ASSET dataset (one of the primary
							# datasets in sentence simplification) to allow using space
							# to split the sentence. Even though Wiki-Auto and TURK datasets,
							# do not require normalization, we do it for consistency.
							# Code adapted from the EASSE library [1] written by the authors of the ASSET dataset.
							# [1] https://github.com/feralvam/easse/blob/580bba7e1378fc8289c663f864e0487188fe8067/easse/utils/preprocessing.py#L7

							if lowercase:
														a__    =  sentence.lower()

							if tokenizer in ["13a", "intl"]:
														if version.parse(sacrebleu.__version__     ).major >= 2:
																					a__    =  sacrebleu.metrics.bleu._get_tokenizer(__lowerCAmelCase     )()(__lowerCAmelCase     )
														else:
																					a__    =  sacrebleu.TOKENIZERS[tokenizer]()(__lowerCAmelCase     )
							elif tokenizer == "moses":
														a__    =  sacremoses.MosesTokenizer().tokenize(__lowerCAmelCase      ,					return_str=__lowerCAmelCase      ,					escape=__lowerCAmelCase     )
							elif tokenizer == "penn":
														a__    =  sacremoses.MosesTokenizer().penn_tokenize(__lowerCAmelCase      ,					return_str=__lowerCAmelCase     )
							else:
														a__    =  sentence

							if not return_str:
														a__    =  normalized_sent.split()

							return normalized_sent






def 							__lowercase     (				__lowerCAmelCase							:       Optional[Any]      ,					__lowerCAmelCase							:       Dict      ,					__lowerCAmelCase							:       List[str]     ):
							if not (len(__lowerCAmelCase     ) == len(__lowerCAmelCase     ) == len(__lowerCAmelCase     )):
														raise ValueError('Sources length must match predictions and references lengths.'     )
							a__    =  0
							for src, pred, refs in zip(__lowerCAmelCase      ,					__lowerCAmelCase      ,					__lowerCAmelCase     ):
														sari_score += SARIsent(normalize(__lowerCAmelCase     )      ,					normalize(__lowerCAmelCase     )      ,					[normalize(__lowerCAmelCase     ) for sent in refs]     )
							a__    =  sari_score / len(__lowerCAmelCase     )
							return 1_0_0 * sari_score






def 							__lowercase     (				__lowerCAmelCase							:       Union[str, Any]      ,					__lowerCAmelCase							:       List[str]      ,					__lowerCAmelCase							:       List[Any]="exp"      ,					__lowerCAmelCase							:       Union[str, Any]=None      ,					__lowerCAmelCase							:       Dict=False      ,					__lowerCAmelCase							:       str=False      ,					__lowerCAmelCase							:       Union[str, Any]=False      ,					):
							a__    =  len(references[0]     )
							if any(len(__lowerCAmelCase     ) != references_per_prediction for refs in references     ):
														raise ValueError('Sacrebleu requires the same number of references for each prediction'     )
							a__    =  [[refs[i] for refs in references] for i in range(__lowerCAmelCase     )]
							a__    =  sacrebleu.corpus_bleu(
							    __lowerCAmelCase      ,					__lowerCAmelCase      ,					smooth_method=__lowerCAmelCase      ,					smooth_value=__lowerCAmelCase      ,					force=__lowerCAmelCase      ,					lowercase=__lowerCAmelCase      ,					use_effective_order=__lowerCAmelCase      ,					)
							return output.score







@datasets.utils.file_utils.add_start_docstrings(_DESCRIPTION			,		_KWARGS_DESCRIPTION   )
class  snake_case_     (datasets.Metric   ):
					def 				lowerCamelCase__(   self     :List[Any]   )      ->					Optional[Any]:
												return datasets.MetricInfo(
												    description=_DESCRIPTION    ,citation=_CITATION    ,inputs_description=_KWARGS_DESCRIPTION    ,features=datasets.Features(
												        {
												            'predictions': datasets.Value('string'    ,id='sequence'   ),
												            'references': datasets.Sequence(datasets.Value('string'    ,id='sequence'   )    ,id='references'   ),
												        }   )    ,codebase_urls=[
												        'https://github.com/huggingface/transformers/blob/master/src/transformers/data/metrics/squad_metrics.py',
												        'https://github.com/cocoxu/simplification/blob/master/SARI.py',
												        'https://github.com/tensorflow/tensor2tensor/blob/master/tensor2tensor/utils/sari_hook.py',
												        'https://github.com/mjpost/sacreBLEU',
												    ]    ,reference_urls=[
												        'https://www.aclweb.org/anthology/Q16-1029.pdf',
												        'https://github.com/mjpost/sacreBLEU',
												        'https://en.wikipedia.org/wiki/BLEU',
												        'https://towardsdatascience.com/evaluating-text-output-in-nlp-bleu-at-your-own-risk-e8609665a213',
												    ]    ,)



					def 				lowerCamelCase__(   self     :Union[str, Any]    ,__snake_case     :List[Any]    ,__snake_case     :List[str]    ,__snake_case     :Any   )      ->					Optional[int]:
												a__    =  {}
												result.update({'sari': compute_sari(sources=__snake_case    ,predictions=__snake_case    ,references=__snake_case   )}   )
												result.update({'sacrebleu': compute_sacrebleu(predictions=__snake_case    ,references=__snake_case   )}   )
												result.update({'exact': compute_em(predictions=__snake_case    ,references=__snake_case   )}   )
												return result








from manim import *







class  snake_case_     (lowerCamelCase_   ):
					def 				lowerCamelCase__(   self     :Optional[Any]   )      ->					Optional[int]:
												a__    =  Rectangle(height=0.5    ,width=0.5   )
												a__    =  Rectangle(height=0.46    ,width=0.46   ).set_stroke(width=0   )

												a__    =  Rectangle(height=0.25    ,width=0.25   )

												a__    =  [mem.copy() for i in range(6   )]
												a__    =  [mem.copy() for i in range(6   )]
												a__    =  VGroup(*__snake_case   ).arrange(__snake_case    ,buff=0   )
												a__    =  VGroup(*__snake_case   ).arrange(__snake_case    ,buff=0   )
												a__    =  VGroup(__snake_case    ,__snake_case   ).arrange(__snake_case    ,buff=0   )
												a__    =  Text('CPU'    ,font_size=24   )
												a__    =  Group(__snake_case    ,__snake_case   ).arrange(__snake_case    ,buff=0.5    ,aligned_edge=__snake_case   )
												cpu.move_to([-2.5, -0.5, 0]   )
												self.add(__snake_case   )

												a__    =  [mem.copy() for i in range(4   )]
												a__    =  VGroup(*__snake_case   ).arrange(__snake_case    ,buff=0   )
												a__    =  Text('GPU'    ,font_size=24   )
												a__    =  Group(__snake_case    ,__snake_case   ).arrange(__snake_case    ,buff=0.5    ,aligned_edge=__snake_case   )
												gpu.move_to([-1, -1, 0]   )
												self.add(__snake_case   )

												a__    =  [mem.copy() for i in range(6   )]
												a__    =  VGroup(*__snake_case   ).arrange(__snake_case    ,buff=0   )

												a__    =  Text('Model'    ,font_size=24   )
												a__    =  Group(__snake_case    ,__snake_case   ).arrange(__snake_case    ,buff=0.5    ,aligned_edge=__snake_case   )
												model.move_to([3, -1.0, 0]   )
												self.add(__snake_case   )

												a__    =  []
												a__    =  []

												for i, rect in enumerate(__snake_case   ):
																			a__    =  fill.copy().set_fill(__snake_case    ,opacity=0.8   )
																			target.move_to(__snake_case   )
																			model_arr.append(__snake_case   )

																			a__    =  Rectangle(height=0.46    ,width=0.46   ).set_stroke(width=0.0   ).set_fill(__snake_case    ,opacity=0.8   )
																			cpu_target.move_to(cpu_left_col_base[i]   )
																			model_cpu_arr.append(__snake_case   )

												self.add(*__snake_case    ,*__snake_case   )

												a__    =  [meta_mem.copy() for i in range(6   )]
												a__    =  [meta_mem.copy() for i in range(6   )]
												a__    =  VGroup(*__snake_case   ).arrange(__snake_case    ,buff=0   )
												a__    =  VGroup(*__snake_case   ).arrange(__snake_case    ,buff=0   )
												a__    =  VGroup(__snake_case    ,__snake_case   ).arrange(__snake_case    ,buff=0   )
												a__    =  Text('Disk'    ,font_size=24   )
												a__    =  Group(__snake_case    ,__snake_case   ).arrange(__snake_case    ,buff=0.5    ,aligned_edge=__snake_case   )
												disk.move_to([-4, -1.25, 0]   )
												self.add(__snake_case    ,__snake_case   )

												a__    =  Square(side_length=2.2   )
												key.move_to([-5, 2, 0]   )

												a__    =  MarkupText(
												    F'<b>Key:</b>\n\n<span fgcolor=\'{YELLOW}\'>●</span> Empty Model'    ,font_size=18    ,)

												key_text.move_to([-5, 2.4, 0]   )

												self.add(__snake_case    ,__snake_case   )

												a__    =  MarkupText(
												    F'<span fgcolor=\'{BLUE}\'>●</span> Checkpoint'    ,font_size=18    ,)

												blue_text.next_to(__snake_case    ,DOWN * 2.4    ,aligned_edge=key_text.get_left()   )
												self.add(__snake_case   )

												a__    =  MarkupText(
												    F'Now watch as an input is passed through the model\nand how the memory is utilized and handled.'    ,font_size=24    ,)
												step_a.move_to([2, 2, 0]   )

												self.play(Write(__snake_case   )   )

												a__    =  Square(0.3   )
												input.set_fill(__snake_case    ,opacity=1.0   )
												input.set_stroke(width=0.0   )
												input.next_to(model_base[0]    ,__snake_case    ,buff=0.5   )

												self.play(Write(__snake_case   )   )

												input.generate_target()
												input.target.next_to(model_arr[0]    ,direction=__snake_case    ,buff=0.02   )
												self.play(MoveToTarget(__snake_case   )   )

												self.play(FadeOut(__snake_case   )   )

												a__    =  Arrow(start=__snake_case    ,end=__snake_case    ,color=__snake_case    ,buff=0.5   )
												a.next_to(model_arr[0].get_left()    ,__snake_case    ,buff=0.2   )

												model_cpu_arr[0].generate_target()
												model_cpu_arr[0].target.move_to(gpu_rect[0]   )

												a__    =  MarkupText(
												    F'As the input reaches a layer, the hook triggers\nand weights are moved from the CPU\nto the GPU and back.'    ,font_size=24    ,)
												step_a.move_to([2, 2, 0]   )

												self.play(Write(__snake_case    ,run_time=3   )   )

												a__    =  {'run_time': 1, 'fade_in': True, 'fade_out': True, 'buff': 0.02}

												self.play(
												    Write(__snake_case   )    ,Circumscribe(model_arr[0]    ,color=__snake_case    ,**__snake_case   )    ,Circumscribe(model_cpu_arr[0]    ,color=__snake_case    ,**__snake_case   )    ,Circumscribe(gpu_rect[0]    ,color=__snake_case    ,**__snake_case   )    ,)
												self.play(MoveToTarget(model_cpu_arr[0]   )   )

												a__    =  a.copy()
												for i in range(6   ):
																			a_c.next_to(model_arr[i].get_right() + 0.02    ,__snake_case    ,buff=0.2   )

																			input.generate_target()
																			input.target.move_to(model_arr[i].get_right() + 0.02   )

																			a__    =  AnimationGroup(
																			    FadeOut(__snake_case    ,run_time=0.5   )    ,MoveToTarget(__snake_case    ,run_time=0.5   )    ,FadeIn(__snake_case    ,run_time=0.5   )    ,lag_ratio=0.2   )

																			self.play(__snake_case   )

																			model_cpu_arr[i].generate_target()
																			model_cpu_arr[i].target.move_to(cpu_left_col_base[i]   )

																			if i < 5:
																										model_cpu_arr[i + 1].generate_target()
																										model_cpu_arr[i + 1].target.move_to(gpu_rect[0]   )
																										if i >= 1:
																																	a__    =  0.7

																										self.play(
																										    Circumscribe(model_arr[i]    ,**__snake_case   )    ,Circumscribe(cpu_left_col_base[i]    ,**__snake_case   )    ,Circumscribe(cpu_left_col_base[i + 1]    ,color=__snake_case    ,**__snake_case   )    ,Circumscribe(gpu_rect[0]    ,color=__snake_case    ,**__snake_case   )    ,Circumscribe(model_arr[i + 1]    ,color=__snake_case    ,**__snake_case   )    ,)
																										if i < 1:
																																	self.play(
																																	    MoveToTarget(model_cpu_arr[i]   )    ,MoveToTarget(model_cpu_arr[i + 1]   )    ,)
																										else:
																																	self.play(
																																	    MoveToTarget(model_cpu_arr[i]    ,run_time=0.7   )    ,MoveToTarget(model_cpu_arr[i + 1]    ,run_time=0.7   )    ,)
																			else:
																										model_cpu_arr[i].generate_target()
																										model_cpu_arr[i].target.move_to(cpu_left_col_base[-1]   )
																										input.generate_target()
																										input.target.next_to(model_arr[-1].get_right()    ,RIGHT + 0.02    ,buff=0.2   )

																										self.play(
																										    Circumscribe(model_arr[-1]    ,color=__snake_case    ,**__snake_case   )    ,Circumscribe(cpu_left_col_base[-1]    ,color=__snake_case    ,**__snake_case   )    ,Circumscribe(gpu_rect[0]    ,color=__snake_case    ,**__snake_case   )    ,)

																										self.play(MoveToTarget(model_cpu_arr[i]   )   )

																			a__    =  a_c
																			a__    =  a_c.copy()

												input.generate_target()
												input.target.next_to(model_base[-1]    ,RIGHT + 0.02    ,buff=0.5   )
												self.play(
												    FadeOut(__snake_case   )    ,FadeOut(__snake_case    ,run_time=0.5   )    ,)

												a__    =  MarkupText(F'Inference on a model too large for GPU memory\nis successfully completed.'    ,font_size=24   )
												step_a.move_to([2, 2, 0]   )

												self.play(Write(__snake_case    ,run_time=3   )    ,MoveToTarget(__snake_case   )   )

												self.wait()




