MCPcopy Create free account
hub / github.com/Notgnoshi/generative / normalize

Function normalize

tools/random-production-rules.py:200–204  ·  view source on GitHub ↗
(distribution)

Source from the content-addressed store, hash-verified

198
199
200def normalize(distribution):
201 denom = sum(distribution.values())
202 for token in distribution:
203 distribution[token] = distribution[token] / denom
204 return distribution
205
206
207def generate_rhs_token(

Callers 1

biasFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected