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
minor on sys message trying to get full response
Browse files- modeling_360vl.py +4 -4
modeling_360vl.py
CHANGED
|
@@ -738,10 +738,10 @@ class QH360_VL_LlamaForCausalLM(LlamaForCausalLM, QH360_VL_MetaForCausalLM):
|
|
| 738 |
'EXCEPTIONS: Information about a specific individual or individuals, contained in a news article, blog posting or media posting, is NOT PHI. '
|
| 739 |
'EXCEPTIONS: Posters and/or event announcments about medical conditions and/or events related to medical conditions, for example a benefit for breast cancer survivors, is NOT PHI. '
|
| 740 |
'EXCEPTION EXAMPLE: An image of a women wearing doctor clothes without the identification of a specific medical condition would NOT BE PHI'
|
| 741 |
-
'Typically
|
| 742 |
-
'EXCEPTIONS override
|
| 743 |
-
'When providing your response it MUST start with "Yes" or "No" based on your review of the image; you MUST
|
| 744 |
-
'of the rationale for the "Yes" or "No" decision including the information found supporting that rational.'
|
| 745 |
)
|
| 746 |
|
| 747 |
input_msg = [
|
|
|
|
| 738 |
'EXCEPTIONS: Information about a specific individual or individuals, contained in a news article, blog posting or media posting, is NOT PHI. '
|
| 739 |
'EXCEPTIONS: Posters and/or event announcments about medical conditions and/or events related to medical conditions, for example a benefit for breast cancer survivors, is NOT PHI. '
|
| 740 |
'EXCEPTION EXAMPLE: An image of a women wearing doctor clothes without the identification of a specific medical condition would NOT BE PHI'
|
| 741 |
+
'Typically you would have identified NO applicable EXCEPTIONS in order to affirmatively answer "Yes" to a question such as "Can you infer PHI from this page?". '
|
| 742 |
+
'EXCEPTIONS override potential identification of PHI; if you are unable to definitively determine the presence of PHI based information in the image, then you DID NOT identify PHI and your determination/response should begin with "No". '
|
| 743 |
+
'When providing your response it MUST start with "Yes" or "No" based on your review of the image; you MUST INCLUDE a brief summary explanation '
|
| 744 |
+
'of the rationale for the "Yes" or "No" decision including the information you found supporting that rational.'
|
| 745 |
)
|
| 746 |
|
| 747 |
input_msg = [
|