Image-Text-to-Text
Transformers
PyTorch
English
doubutsu_next
conversational
custom_code
Inference Endpoints
qtnx commited on
Commit
e289ebb
1 Parent(s): ec5b76c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +78 -3
README.md CHANGED
@@ -1,3 +1,78 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ datasets:
4
+ - liuhaotian/LLaVA-CC3M-Pretrain-595K
5
+ pipeline_tag: image-text-to-text
6
+ language:
7
+ - en
8
+ ---
9
+
10
+ > [!IMPORTANT]
11
+ > NOTE: This model is not meant to be used alone, you need to either finetune it with this [notebook](https://github.com/qrsch/doubutsu/blob/main/notebooks/finetuning_next.ipynb) or use an existing adapter.
12
+
13
+ # doubutsu-2b-pt-756
14
+
15
+ `doubutsu` is a family of smol VLMs meant to be finetuned for your own use-case.
16
+
17
+ Built by [@qtnx_](https://x.com/qtnx_) and [@yeswondwerr](https://x.com/yeswondwerr)
18
+
19
+ ## Usage
20
+
21
+ ```python
22
+ import torch
23
+ from transformers import AutoModelForCausalLM, AutoTokenizer
24
+ from PIL import Image
25
+
26
+ model_id = "qresearch/doubutsu-2b-pt-756"
27
+ model = AutoModelForCausalLM.from_pretrained(
28
+ model_id,
29
+ trust_remote_code=True,
30
+ torch_dtype=torch.float16,
31
+ ).to("cuda")
32
+
33
+ tokenizer = AutoTokenizer.from_pretrained(
34
+ model_id,
35
+ use_fast=True,
36
+ )
37
+
38
+ model.load_adapter("qresearch/doubutsu-2b-lora-756-docci")
39
+
40
+ image = Image.open("IMAGE")
41
+
42
+ print(
43
+ model.answer_question(
44
+ image, "Describe the image", tokenizer, max_new_tokens=128, temperature=0.1
45
+ ),
46
+ )
47
+ ```
48
+
49
+ > [!TIP]
50
+ > these models require smaller temperatures. We recommend to use a temperature of 0.1-0.3.
51
+
52
+ ## Evals
53
+
54
+ TBD
55
+
56
+ ## Acknowledgements
57
+
58
+ - Liu et al. : [LLaVA](https://arxiv.org/abs/2304.08485)
59
+ - Moon et al. : [AnyMAL](https://arxiv.org/abs/2309.16058)
60
+ - vikhyatk : moondream codebase
61
+
62
+ ```
63
+ .x+=:.
64
+ z` ^% .uef^"
65
+ .u . . <k .u . :d88E
66
+ .u@u .d88B :@8c .u .@8Ned8" .u u .d88B :@8c . `888E
67
+ .zWF8888bx ="8888f8888r ud8888. .@^%8888" ud8888. us888u. ="8888f8888r .udR88N 888E .z8k
68
+ .888 9888 4888>'88" :888'8888. x88: `)8b. :888'8888. .@88 "8888" 4888>'88" <888'888k 888E~?888L
69
+ I888 9888 4888> ' d888 '88%" 8888N=*8888 d888 '88%" 9888 9888 4888> ' 9888 'Y" 888E 888E
70
+ I888 9888 4888> 8888.+" %8" R88 8888.+" 9888 9888 4888> 9888 888E 888E
71
+ I888 9888 .d888L .+ 8888L @8Wou 9% 8888L 9888 9888 .d888L .+ 9888 888E 888E
72
+ `888Nx?888 ^"8888*" '8888c. .+ .888888P` '8888c. .+ 9888 9888 ^"8888*" ?8888u../ 888E 888E
73
+ "88" '888 "Y" "88888% ` ^"F "88888% "888*""888" "Y" "8888P' m888N= 888>
74
+ 88E "YP' "YP' ^Y" ^Y' "P' `Y" 888
75
+ 98> J88"
76
+ '8 @%
77
+ ` :"
78
+ ```