Document Question Answering
Transformers
Safetensors
chatglm
feature-extraction
text-generation-inference
custom_code
4-bit precision
bitsandbytes
Instructions to use nikravan/glm-4vq with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nikravan/glm-4vq with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("document-question-answering", model="nikravan/glm-4vq", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("nikravan/glm-4vq", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
fix colab error
Browse files
visual.py
CHANGED
|
@@ -66,7 +66,7 @@ class Attention(nn.Module):
|
|
| 66 |
out = attention_fn_default(
|
| 67 |
q, k, v
|
| 68 |
)
|
| 69 |
-
output = self.dense(out.transpose(1, 2).view(B, L, -1))
|
| 70 |
output = self.output_dropout(output)
|
| 71 |
return output
|
| 72 |
|
|
|
|
| 66 |
out = attention_fn_default(
|
| 67 |
q, k, v
|
| 68 |
)
|
| 69 |
+
output = self.dense(out.transpose(1, 2).contiguous().view(B, L, -1))
|
| 70 |
output = self.output_dropout(output)
|
| 71 |
return output
|
| 72 |
|