Instructions to use katuni4ka/tiny-random-glm4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use katuni4ka/tiny-random-glm4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="katuni4ka/tiny-random-glm4", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("katuni4ka/tiny-random-glm4", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
fix import
Browse files- modeling_chatglm.py +1 -0
modeling_chatglm.py
CHANGED
|
@@ -6,6 +6,7 @@ import warnings
|
|
| 6 |
import re
|
| 7 |
import sys
|
| 8 |
|
|
|
|
| 9 |
import torch
|
| 10 |
import torch.utils.checkpoint
|
| 11 |
import torch.nn.functional as F
|
|
|
|
| 6 |
import re
|
| 7 |
import sys
|
| 8 |
|
| 9 |
+
import transformers
|
| 10 |
import torch
|
| 11 |
import torch.utils.checkpoint
|
| 12 |
import torch.nn.functional as F
|