codeShare commited on
Commit
10399a7
·
verified ·
1 Parent(s): 26b80ca

Upload 11 files

Browse files
Files changed (4) hide show
  1. README.md +1 -56
  2. adapter_config.json +5 -4
  3. adapter_model.safetensors +1 -1
  4. tokenizer.json +2 -2
README.md CHANGED
@@ -1,61 +1,6 @@
1
- ---
2
- license: mit
3
- datasets:
4
- - lodestones/e621-captions
5
- - lodestones/pixelprose
6
- language:
7
- - en
8
- base_model:
9
- - google/gemma-3-4b-it
10
- tags:
11
- - flux
12
- - flux_chroma
13
- - chroma
14
- - image_to_prompt
15
- - captioning
16
- - lora
17
- - gemma
18
- - image_caption
19
- - image_classification
20
- - google_colab
21
- - jupyter
22
- - unslouth
23
- - dataset_processing
24
- ---
25
-
26
- A proof of concept generating captions using Google Gemma 3 on Google Colab Free Tier for captioning prompts akin to training data of FLUX Chroma: https://huggingface.co/lodestones/Chroma
27
-
28
- Try the Chroma model at: https://tensor.art/models/891236315830428357
29
-
30
- This dataset was built using 200 images from Redcaps : https://huggingface.co/datasets/lodestones/pixelprose
31
-
32
- And 200 LLM captioned e621 images: https://huggingface.co/datasets/lodestones/e621-captions/tree/main
33
-
34
- The total trained images are just 400 total , randomly selected , so this LoRa adaptation is very basic! You can likely train a better version yourself with listed tools on Google Colab Free Tier T4.
35
-
36
-
37
- Want to train your own LoRa from a JSON or .parquet set if data? Use this notebook found in this repo: https://huggingface.co/codeShare/flux_chroma_image_captioner/blob/main/train_on_parquet.ipynb
38
-
39
- //----//
40
-
41
- I made some .parquets of the captions here for easier browsing: https://huggingface.co/datasets/codeShare/chroma_prompts
42
-
43
- To use this Gemma LoRa adaptation got to the Google Colab Jupyter notebook in this repo: https://huggingface.co/codeShare/flux_chroma_image_captioner/blob/main/gemma_image_captioner.ipynb
44
-
45
- To train your own LoRa adaptation of the Gemma on Google Colab Free Tier T4 , visit : https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/Gemma3_(4B)-Vision.ipynb
46
-
47
-
48
  ---
49
  base_model: unsloth/gemma-3-4b-pt-unsloth-bnb-4bit
50
  library_name: peft
51
- pipeline_tag: text-generation
52
- tags:
53
- - base_model:adapter:unsloth/gemma-3-4b-pt-unsloth-bnb-4bit
54
- - lora
55
- - sft
56
- - transformers
57
- - trl
58
- - unsloth
59
  ---
60
 
61
  # Model Card for Model ID
@@ -254,4 +199,4 @@ Carbon emissions can be estimated using the [Machine Learning Impact calculator]
254
  [More Information Needed]
255
  ### Framework versions
256
 
257
- - PEFT 0.16.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  base_model: unsloth/gemma-3-4b-pt-unsloth-bnb-4bit
3
  library_name: peft
 
 
 
 
 
 
 
 
4
  ---
5
 
6
  # Model Card for Model ID
 
199
  [More Information Needed]
200
  ### Framework versions
201
 
202
+ - PEFT 0.15.2
adapter_config.json CHANGED
@@ -1,6 +1,9 @@
1
  {
2
  "alpha_pattern": {},
3
- "auto_mapping": null,
 
 
 
4
  "base_model_name_or_path": "unsloth/gemma-3-4b-pt-unsloth-bnb-4bit",
5
  "bias": "none",
6
  "corda_config": null,
@@ -20,14 +23,12 @@
20
  "megatron_core": "megatron.core",
21
  "modules_to_save": null,
22
  "peft_type": "LORA",
23
- "qalora_group_size": 16,
24
  "r": 16,
25
  "rank_pattern": {},
26
  "revision": null,
27
  "target_modules": "(?:.*?(?:vision|image|visual|patch|language|text).*?(?:self_attn|attention|attn|mlp|feed_forward|ffn|dense).*?(?:k_proj|v_proj|q_proj|out_proj|fc1|fc2|o_proj|gate_proj|up_proj|down_proj).*?)|(?:\\bmodel\\.layers\\.[\\d]{1,}\\.(?:self_attn|attention|attn|mlp|feed_forward|ffn|dense)\\.(?:(?:k_proj|v_proj|q_proj|out_proj|fc1|fc2|o_proj|gate_proj|up_proj|down_proj)))",
28
- "task_type": "CAUSAL_LM",
29
  "trainable_token_indices": null,
30
  "use_dora": false,
31
- "use_qalora": false,
32
  "use_rslora": false
33
  }
 
1
  {
2
  "alpha_pattern": {},
3
+ "auto_mapping": {
4
+ "base_model_class": "Gemma3ForConditionalGeneration",
5
+ "parent_library": "transformers.models.gemma3.modeling_gemma3"
6
+ },
7
  "base_model_name_or_path": "unsloth/gemma-3-4b-pt-unsloth-bnb-4bit",
8
  "bias": "none",
9
  "corda_config": null,
 
23
  "megatron_core": "megatron.core",
24
  "modules_to_save": null,
25
  "peft_type": "LORA",
 
26
  "r": 16,
27
  "rank_pattern": {},
28
  "revision": null,
29
  "target_modules": "(?:.*?(?:vision|image|visual|patch|language|text).*?(?:self_attn|attention|attn|mlp|feed_forward|ffn|dense).*?(?:k_proj|v_proj|q_proj|out_proj|fc1|fc2|o_proj|gate_proj|up_proj|down_proj).*?)|(?:\\bmodel\\.layers\\.[\\d]{1,}\\.(?:self_attn|attention|attn|mlp|feed_forward|ffn|dense)\\.(?:(?:k_proj|v_proj|q_proj|out_proj|fc1|fc2|o_proj|gate_proj|up_proj|down_proj)))",
30
+ "task_type": null,
31
  "trainable_token_indices": null,
32
  "use_dora": false,
 
33
  "use_rslora": false
34
  }
adapter_model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:929aead3515c1858c79d237fd52f263b202385cb35a84ad970d9e6a631ce78c7
3
  size 154116312
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b43e2d99469793a1b41b64bf399a083ef9026a3eefffe1f99328581833f09fca
3
  size 154116312
tokenizer.json CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:4667f2089529e8e7657cfb6d1c19910ae71ff5f28aa7ab2ff2763330affad795
3
- size 33384568
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7666402c0617d170e6b0a985b3130c3fb0795393aa0970600994a5d9aae12351
3
+ size 33384822