Instructions to use stanrom/ShareCaptioner with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use stanrom/ShareCaptioner with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="stanrom/ShareCaptioner", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("stanrom/ShareCaptioner", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit History
-
Update modeling_InternLM_XComposer.py
Verified signature6740366
-
disable load_in_4bit=True
Verified signaturef862375 -
to(torch.float16)
Verified signature66ceca3 -
load_in_4bit=True
Verified signature7bbe75c
-
not moving to cuda
Verified signature5c9b572 -
to_empty('meta') --> to_empty('cuda')
Verified signature77cc3ef
-
tie.weights
Verified signaturef150edc
-
meta --> cuda
Verified signature8b1a245
-
only meta
Verified signature8f2d100 -
cpu --> meta
Verified signaturebea937b -
trying to use cpu
Verified signaturea88a9ef -
'meta' device instead of cuda
Verified signaturee749409 -
Acceleration compatibility
Verified signaturedevice='cuda' --> device='meta'2c8fb29
-
Update tokenization_InternLM_XComposer.py
Verified signature07679de -
Update tokenization_InternLM_XComposer.py
Verified signaturec3b6e57 -
Duplicate from Lin-Chen/ShareCaptioner
Verified signatureCo-authored-by: Lin Chen <Lin-Chen@users.noreply.huggingface.co>ffc8e21