Instructions to use q-future/one-align with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use q-future/one-align with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-image-classification", model="q-future/one-align", trust_remote_code=True) pipe( "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png", candidate_labels=["animals", "humans", "landscape"], )# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("q-future/one-align", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Upload configuration_mplug_owl2.py with huggingface_hub
Browse files
configuration_mplug_owl2.py
CHANGED
|
@@ -117,6 +117,7 @@ class LlamaConfig(PretrainedConfig):
|
|
| 117 |
rope_theta=10000.0,
|
| 118 |
rope_scaling=None,
|
| 119 |
attention_bias=False,
|
|
|
|
| 120 |
**kwargs,
|
| 121 |
):
|
| 122 |
self.vocab_size = vocab_size
|
|
@@ -140,6 +141,8 @@ class LlamaConfig(PretrainedConfig):
|
|
| 140 |
self.rope_scaling = rope_scaling
|
| 141 |
self._rope_scaling_validation()
|
| 142 |
self.attention_bias = attention_bias
|
|
|
|
|
|
|
| 143 |
|
| 144 |
super().__init__(
|
| 145 |
pad_token_id=pad_token_id,
|
|
|
|
| 117 |
rope_theta=10000.0,
|
| 118 |
rope_scaling=None,
|
| 119 |
attention_bias=False,
|
| 120 |
+
attention_dropout=0.0,
|
| 121 |
**kwargs,
|
| 122 |
):
|
| 123 |
self.vocab_size = vocab_size
|
|
|
|
| 141 |
self.rope_scaling = rope_scaling
|
| 142 |
self._rope_scaling_validation()
|
| 143 |
self.attention_bias = attention_bias
|
| 144 |
+
self.attention_dropout = attention_dropout
|
| 145 |
+
self._attn_implementation = "flash_attention_2"
|
| 146 |
|
| 147 |
super().__init__(
|
| 148 |
pad_token_id=pad_token_id,
|