MCPcopy Create free account
hub / github.com/OpenBitSys/BitDistiller / get_stop_token_ids

Function get_stop_token_ids

inference/utils/prompt_templates.py:238–251  ·  view source on GitHub ↗
(model_type, model_path="")

Source from the content-addressed store, hash-verified

236
237
238def get_stop_token_ids(model_type, model_path=""):
239 if model_type.lower() == "llama":
240 return []
241 elif model_type.lower() == "falcon":
242 return [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
243 elif model_type.lower() == "mpt":
244 if "mpt" and "chat" in model_path:
245 return [50278, 0]
246 else:
247 return []
248 elif model_type.lower() == "metamath":
249 return []
250 else:
251 raise ValueError(f"model type {model_type} is not supported")

Callers 1

demo.pyFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected