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"], )# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("q-future/one-align", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload modeling_mplug_owl2.py with huggingface_hub
Browse files- modeling_mplug_owl2.py +1 -1
modeling_mplug_owl2.py
CHANGED
|
@@ -26,7 +26,7 @@ import sys
|
|
| 26 |
dir_path = os.path.dirname(os.path.realpath(__file__))
|
| 27 |
sys.path.insert(0, dir_path)
|
| 28 |
|
| 29 |
-
from transformers import AutoConfig, AutoModelForCausalLM, LlamaConfig, LlamaModel, LlamaForCausalLM
|
| 30 |
from transformers.modeling_outputs import CausalLMOutputWithPast
|
| 31 |
|
| 32 |
from .configuration_mplug_owl2 import MPLUGOwl2Config, MplugOwlVisionConfig, MplugOwlVisualAbstractorConfig
|
|
|
|
| 26 |
dir_path = os.path.dirname(os.path.realpath(__file__))
|
| 27 |
sys.path.insert(0, dir_path)
|
| 28 |
|
| 29 |
+
from transformers import AutoConfig, AutoModelForCausalLM, AutoTokenizer, CLIPImageProcessor, LlamaConfig, LlamaModel, LlamaForCausalLM
|
| 30 |
from transformers.modeling_outputs import CausalLMOutputWithPast
|
| 31 |
|
| 32 |
from .configuration_mplug_owl2 import MPLUGOwl2Config, MplugOwlVisionConfig, MplugOwlVisualAbstractorConfig
|