Instructions to use katuni4ka/tiny-random-chatglm2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use katuni4ka/tiny-random-chatglm2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="katuni4ka/tiny-random-chatglm2", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("katuni4ka/tiny-random-chatglm2", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download config.json from katuni4ka/tiny-random-chatglm2: direct link, hf CLI and curl.
- Browser
- Download file 1.64 kB
-
https://huggingface.co/katuni4ka/tiny-random-chatglm2/resolve/main/config.json
- Command line
-
hf download hf://katuni4ka/tiny-random-chatglm2/config.json
-
curl -L -o config.json https://huggingface.co/katuni4ka/tiny-random-chatglm2/resolve/main/config.json
1.64 kB
| { | |
| "_name_or_path": "katuni4ka/tiny-random-chatglm2", | |
| "add_bias_linear": false, | |
| "add_qkv_bias": true, | |
| "apply_query_key_layer_scaling": true, | |
| "apply_residual_connection_post_layernorm": false, | |
| "architectures": [ | |
| "ChatGLMForConditionalGeneration" | |
| ], | |
| "attention_dropout": 0.0, | |
| "attention_softmax_in_fp32": true, | |
| "auto_map": { | |
| "AutoConfig": "katuni4ka/tiny-random-chatglm2--configuration_chatglm.ChatGLMConfig", | |
| "AutoModel": "katuni4ka/tiny-random-chatglm2--modeling_chatglm.ChatGLMForConditionalGeneration", | |
| "AutoModelForCausalLM": "katuni4ka/tiny-random-chatglm2--modeling_chatglm.ChatGLMForConditionalGeneration", | |
| "AutoModelForSeq2SeqLM": "katuni4ka/tiny-random-chatglm2--modeling_chatglm.ChatGLMForConditionalGeneration", | |
| "AutoModelForSequenceClassification": "katuni4ka/tiny-random-chatglm2--modeling_chatglm.ChatGLMForSequenceClassification" | |
| }, | |
| "bias_dropout_fusion": true, | |
| "classifier_dropout": null, | |
| "eos_token_id": 2, | |
| "ffn_hidden_size": 3424, | |
| "fp32_residual_connection": false, | |
| "hidden_dropout": 0.0, | |
| "hidden_size": 128, | |
| "kv_channels": 32, | |
| "layernorm_epsilon": 1e-05, | |
| "model_type": "chatglm", | |
| "multi_query_attention": true, | |
| "multi_query_group_num": 1, | |
| "num_attention_heads": 2, | |
| "num_layers": 2, | |
| "original_rope": true, | |
| "pad_token_id": 0, | |
| "padded_vocab_size": 65024, | |
| "post_layer_norm": true, | |
| "pre_seq_len": null, | |
| "prefix_projection": false, | |
| "quantization_bit": 0, | |
| "rmsnorm": true, | |
| "seq_length": 32768, | |
| "tie_word_embeddings": false, | |
| "torch_dtype": "float32", | |
| "transformers_version": "4.38.1", | |
| "use_cache": true, | |
| "vocab_size": 65024 | |
| } | |