File size: 2,204 Bytes
72f684c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
project:
  project: starvector-8b-im2svg
  use_wandb: false
  entity: joanrod
  copy_code: false
model:
  max_length: 16000
  model_name: starvector/starvector-8b-im2svg
  starcoder_model_name: bigcode/starcoder2-7b
  pretrained: true
  image_encoder_type: siglip_384
  use_flash_attn: true
  adapter_norm: layer_norm
  init_type: normal
  dropout: 0.1
  task: im2svg
  transformer_layer_cls: Starcoder2DecoderLayer # fsdp specific
  use_cache: false
training:
  save_model_epochs: 1
  checkpointing_steps: 500
  checkpoints_total_limit: 5
  model_precision: bf16
  resume_from_checkpoint: false
  continue_training: false
  n_epochs: 4
  lr: 0.00001
  gradient_accumulation_steps: 4
  lr_scheduler: cosine
  lr_warmup_steps: 10
  adam_beta1: 0.95
  adam_beta2: 0.999
  adam_weight_decay: 1.0e-06
  adam_epsilon: 1e-08
  optimizer: adamw
  use_gradient_checkpointing: true
  train_image_encoder: true
  train_LLM: true
fsdp:
  enable: true # TODO: set this reasonably, i.e., false only if you want to use DDP or have PyTorch < 2.1
  cpu_offload: false
  sharding_strategy: hsdp
  backward_prefetch: BACKWARD_PRE
  use_orig_params: true
  sync_module_states: true
  forward_prefetch: false
  cpu_ram_efficient_loading: true
data:
  num_workers: 16
  train:
    batch_size: 1
    target: starvector.data.fontsvg.FontSVGDataset
    params:
      split: train
      dataset_name: starvector/svg-fonts-simple
      im_size: 384
      num_samples: -1
      transforms: false
      image_processor: siglip_384
  test:
    batch_size: 4
    target: starvector.data.fontsvg.FontSVGDataset
    params:
      split: test
      dataset_name: starvector/svg-fonts-simple
      im_size: 384
      num_samples: 128
      transforms: false
      image_processor: siglip_384
generation:
  max_length: 10000
  min_length: 10
  num_beams: 3
  temperature: 1.0
  num_captions: 1
  repetition_penalty: 1.0
  length_penalty: 0.5
  top_p: 0.95
  use_nucleus_sampling: true
  im_size: 384
  dpi: 2
  scale: 300
metrics:
  L2: true
  Masked-L2: false
  LPIPS: true
  SSIM: true
  FID: false
  FID_clip: false
  CLIPScore: false
  CountTokenLength: true
  ratio_post_processed: false
  ratio_non_compiling: false
  DinoScore: true