Download tests/debug.py from Intel/low_bit_open_llm_leaderboard: direct link, hf CLI and curl.
- Browser
- Download file 668 Bytes
-
https://huggingface.co/spaces/Intel/low_bit_open_llm_leaderboard/resolve/main/tests/debug.py
- Command line
-
hf download hf://spaces/Intel/low_bit_open_llm_leaderboard/tests/debug.py
-
curl -L -o debug.py https://huggingface.co/spaces/Intel/low_bit_open_llm_leaderboard/resolve/main/tests/debug.py
668 Bytes
| import transformers | |
| from transformers import AutoConfig, AutoModelForCausalLM | |
| model_id = "meta-models/Muse-Glimmer-30B" | |
| cfg = AutoConfig.from_pretrained(model_id, trust_remote_code=True) | |
| print("transformers:", transformers.__version__) | |
| print("config:", type(cfg).__name__) | |
| print("model_type:", cfg.model_type) | |
| print("architectures:", cfg.architectures) | |
| print("AutoModelForCausalLM supports config:", | |
| type(cfg) in AutoModelForCausalLM._model_mapping) | |
| image_text = getattr(transformers, "AutoModelForImageTextToText", None) | |
| if image_text is not None: | |
| print("AutoModelForImageTextToText supports config:", | |
| type(cfg) in image_text._model_mapping) | |