MCPcopy
hub / github.com/microsoft/JARVIS / get_max_context_length

Function get_max_context_length

hugginggpt/server/get_token_ids.py:40–41  ·  view source on GitHub ↗
(model_name)

Source from the content-addressed store, hash-verified

38 return len(encodings[model_name].encode(text))
39
40def get_max_context_length(model_name):
41 return max_length[model_name]
42
43def get_token_ids_for_task_parsing(model_name):
44 text = '''{"task": "text-classification", "token-classification", "text2text-generation", "summarization", "translation", "question-answering", "conversational", "text-generation", "sentence-similarity", "tabular-classification", "object-detection", "image-classification", "image-to-image", "image-to-text", "text-to-image", "visual-question-answering", "document-question-answering", "image-segmentation", "text-to-speech", "text-to-video", "automatic-speech-recognition", "audio-to-audio", "audio-classification", "canny-control", "hed-control", "mlsd-control", "normal-control", "openpose-control", "canny-text-to-image", "depth-text-to-image", "hed-text-to-image", "mlsd-text-to-image", "normal-text-to-image", "openpose-text-to-image", "seg-text-to-image", "args", "text", "path", "dep", "id", "<GENERATED>-"}'''

Callers 2

parse_taskFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected