Upload 6 files
Browse filesFiles changed (6)
- nf4/chat_template.jinjaAdded+45
- nf4/config.jsonAdded+72
- nf4/generation_config.jsonAdded+7
- nf4/model.safetensorsAdded+3
- nf4/special_tokens_map.jsonAdded+23
- nf4/tokenizer.jsonAdded
123456789101112131415161718192021222324252627282930313233343536373839404142434445{{- bos_token -}}{%- set keep_past_thinking = keep_past_thinking | default(false) -%}{%- set ns = namespace(system_prompt="") -%}{%- if messages[0]["role"] == "system" -%} {%- set ns.system_prompt = messages[0]["content"] -%} {%- set messages = messages[1:] -%}{%- endif -%}{%- if tools -%} {%- set ns.system_prompt = ns.system_prompt + ("\n" if ns.system_prompt else "") + "List of tools: [" -%} {%- for tool in tools -%} {%- if tool is not string -%} {%- set tool = tool | tojson -%} {%- endif -%} {%- set ns.system_prompt = ns.system_prompt + tool -%} {%- if not loop.last -%} {%- set ns.system_prompt = ns.system_prompt + ", " -%} {%- endif -%} {%- endfor -%} {%- set ns.system_prompt = ns.system_prompt + "]" -%}{%- endif -%}{%- if ns.system_prompt -%} {{- "<|im_start|>system\n" + ns.system_prompt + "<|im_end|>\n" -}}{%- endif -%}{%- set ns.last_assistant_index = -1 -%}{%- for message in messages -%} {%- if message["role"] == "assistant" -%} {%- set ns.last_assistant_index = loop.index0 -%} {%- endif -%}{%- endfor -%}{%- for message in messages -%} {{- "<|im_start|>" + message["role"] + "\n" -}} {%- set content = message["content"] -%} {%- if content is not string -%} {%- set content = content | tojson -%} {%- endif -%} {%- if message["role"] == "assistant" and not keep_past_thinking and loop.index0 != ns.last_assistant_index -%} {%- if "</think>" in content -%} {%- set content = content.split("</think>")[-1] | trim -%} {%- endif -%} {%- endif -%} {{- content + "<|im_end|>\n" -}}{%- endfor -%}{%- if add_generation_prompt -%} {{- "<|im_start|>assistant\n" -}}{%- endif -%}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172{ "architectures": [ "Lfm2ForCausalLM" ], "block_auto_adjust_ff_dim": true, "block_dim": 2048, "block_ff_dim": 12288, "block_ffn_dim_multiplier": 1.0, "block_mlp_init_scale": 1.0, "block_multiple_of": 256, "block_norm_eps": 1e-05, "block_out_init_scale": 1.0, "block_use_swiglu": true, "block_use_xavier_init": true, "bos_token_id": 1, "conv_L_cache": 3, "conv_bias": false, "conv_dim": 2048, "conv_use_xavier_init": true, "dtype": "float16", "eos_token_id": 7, "hidden_size": 2048, "initializer_range": 0.02, "intermediate_size": 12288, "layer_types": [ "conv", "conv", "full_attention", "conv", "conv", "full_attention", "conv", "conv", "full_attention", "conv", "full_attention", "conv", "full_attention", "conv", "full_attention", "conv" ], "max_position_embeddings": 128000, "model_type": "lfm2", "norm_eps": 1e-05, "num_attention_heads": 32, "num_heads": 32, "num_hidden_layers": 16, "num_key_value_heads": 8, "pad_token_id": 0, "quantization_config": { "_load_in_4bit": true, "_load_in_8bit": false, "bnb_4bit_compute_dtype": "float32", "bnb_4bit_quant_storage": "uint8", "bnb_4bit_quant_type": "nf4", "bnb_4bit_use_double_quant": true, "llm_int8_enable_fp32_cpu_offload": false, "llm_int8_has_fp16_weight": false, "llm_int8_skip_modules": null, "llm_int8_threshold": 6.0, "load_in_4bit": true, "load_in_8bit": false, "quant_method": "bitsandbytes" }, "rope_theta": 1000000.0, "tie_embedding": true, "transformers_version": "4.57.3", "use_cache": true, "use_pos_enc": true, "vocab_size": 65536}1234567{ "_from_model_config": true, "bos_token_id": 1, "eos_token_id": 7, "pad_token_id": 0, "transformers_version": "4.57.3"}123version https://git-lfs.github.com/spec/v1oid sha256:9845f9a95998742ee758b36b865220b789c10a1f7073cb39d5976592a4a2ed9dsize 8033187391234567891011121314151617181920212223{ "bos_token": { "content": "<|startoftext|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "eos_token": { "content": "<|im_end|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "pad_token": { "content": "<|pad|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }}nf4/chat_template.jinjaAdded+45
nf4/config.jsonAdded+72
nf4/generation_config.jsonAdded+7
nf4/model.safetensorsAdded+3
nf4/special_tokens_map.jsonAdded+23
nf4/tokenizer.jsonAdded