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
Update README.md
Browse files
README.md
CHANGED
|
@@ -12,7 +12,7 @@ import requests
|
|
| 12 |
import torch
|
| 13 |
from transformers import AutoModelForCausalLM
|
| 14 |
|
| 15 |
-
model = AutoModelForCausalLM.from_pretrained("q-future/one-align", trust_remote_code=True,
|
| 16 |
torch_dtype=torch.float16, device_map="auto")
|
| 17 |
|
| 18 |
from PIL import Image
|
|
|
|
| 12 |
import torch
|
| 13 |
from transformers import AutoModelForCausalLM
|
| 14 |
|
| 15 |
+
model = AutoModelForCausalLM.from_pretrained("q-future/one-align", trust_remote_code=True, attn_implementation="eager",
|
| 16 |
torch_dtype=torch.float16, device_map="auto")
|
| 17 |
|
| 18 |
from PIL import Image
|