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)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("katuni4ka/tiny-random-chatglm2", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Update modeling_chatglm.py
Browse files- modeling_chatglm.py +1 -1
modeling_chatglm.py
CHANGED
|
@@ -731,7 +731,7 @@ class Embedding(torch.nn.Module):
|
|
| 731 |
|
| 732 |
|
| 733 |
class ChatGLMModel(ChatGLMPreTrainedModel):
|
| 734 |
-
def __init__(self, config: ChatGLMConfig, device=None, empty_init=
|
| 735 |
super().__init__(config)
|
| 736 |
if empty_init:
|
| 737 |
init_method = skip_init
|
|
|
|
| 731 |
|
| 732 |
|
| 733 |
class ChatGLMModel(ChatGLMPreTrainedModel):
|
| 734 |
+
def __init__(self, config: ChatGLMConfig, device=None, empty_init=False):
|
| 735 |
super().__init__(config)
|
| 736 |
if empty_init:
|
| 737 |
init_method = skip_init
|