Visual Question Answering
Transformers
Safetensors
Chinese
English
QH_360VL
text-generation
custom_code
Instructions to use ecfirst/360VL_PHI with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ecfirst/360VL_PHI with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "visual-question-answering" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # pip install "transformers<5.0.0" from transformers import pipeline pipe = pipeline("visual-question-answering", model="ecfirst/360VL_PHI", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("ecfirst/360VL_PHI", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -66,7 +66,7 @@ from PIL import Image
|
|
| 66 |
|
| 67 |
checkpoint = "qihoo360/360VL-8B"
|
| 68 |
|
| 69 |
-
model = AutoModelForCausalLM.from_pretrained(checkpoint, torch_dtype=torch.float16, device_map='
|
| 70 |
tokenizer = AutoTokenizer.from_pretrained(checkpoint, trust_remote_code=True)
|
| 71 |
vision_tower = model.get_vision_tower()
|
| 72 |
vision_tower.load_model()
|
|
|
|
| 66 |
|
| 67 |
checkpoint = "qihoo360/360VL-8B"
|
| 68 |
|
| 69 |
+
model = AutoModelForCausalLM.from_pretrained(checkpoint, torch_dtype=torch.float16, device_map='auto', trust_remote_code=True).eval()
|
| 70 |
tokenizer = AutoTokenizer.from_pretrained(checkpoint, trust_remote_code=True)
|
| 71 |
vision_tower = model.get_vision_tower()
|
| 72 |
vision_tower.load_model()
|