mergekit icon indicating copy to clipboard operation
mergekit copied to clipboard

[Bug?] `dict()` error when loading YAML config

Open T145 opened this issue 1 year ago • 0 comments

I have this YAML config:

base_model: Orenguteng/Llama-3.1-8B-Lexi-Uncensored-V2
dtype: bfloat16
merge_method: breadcrumbs_ties
tokenizer:
  source: union
parameters:
  int8_mask: true
  #normalize: true
  random_seed: 145
models:
  - model: arcee-ai/Llama-3.1-SuperNova-Lite
    parameters:
      weight:
        - filter: lm_head
          value: 0.0
        - filter: self_attn.o_proj
          value: 0.0
        - filter: mlp.down_proj
          value: 0.0
        - value: 0.42
      density: 0.9
      gamma: 0.01
  - model: VAGOsolutions/Llama-3.1-SauerkrautLM-8b-Instruct
    parameters:
      weight:
        - filter: lm_head
          value: 0.0
        - filter: self_attn.o_proj
          value: 0.0
        - filter: mlp.down_proj
          value: 0.0
        - value: 0.33
      density: 0.9
      gamma: 0.01
  - model: unsloth/Llama-3.1-Storm-8B
    parameters:
      weight:
        - filter: lm_head
          value: 0.0
        - filter: self_attn.o_proj
          value: 0.0
        - filter: mlp.down_proj
          value: 0.0
        - value: 0.25
      density: 0.9
      gamma: 0.01

And am getting this error:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "{ENV{\mergekit-yaml.exe\__main__.py", line 8, in <module>
  File "{ENV}\click\core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "{ENV}\click\core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "{ENV}\click\core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "{ENV}\click\core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "{ENV}\mergekit\options.py", line 82, in wrapper
    f(*args, **kwargs)
  File "{ENV}\mergekit\scripts\run_yaml.py", line 47, in main
    run_merge(
  File "{ENV}\mergekit\merge.py", line 96, in run_merge
    for _task, value in exec.run(quiet=options.quiet):
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "{ENV}\mergekit\graph.py", line 197, in run
    res = task.execute(**arguments)
          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "{ENV}\mergekit\tokenizer\embed.py", line 62, in execute
    token_configs = dict(**self.tokens) or {}
                    ^^^^^^^^^^^^^^^^^^^
TypeError: dict() argument after ** must be a mapping, not NoneType

What am I missing?

T145 avatar Jan 02 '25 06:01 T145