MCPcopy Create free account
hub / github.com/AnswerDotAI/ModernBERT / build_algorithm

Function build_algorithm

sequence_classification.py:90–98  ·  view source on GitHub ↗
(name, kwargs)

Source from the content-addressed store, hash-verified

88
89
90def build_algorithm(name, kwargs):
91 if name == "gradient_clipping":
92 return algorithms.GradientClipping(**kwargs)
93 elif name == "alibi":
94 return algorithms.Alibi(**kwargs)
95 elif name == "gated_linear_units":
96 return algorithms.GatedLinearUnits(**kwargs)
97 else:
98 raise ValueError(f"Not sure how to build algorithm: {name}")
99
100
101def build_callback(name, kwargs):

Callers 1

trainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected