Text Generation
Transformers
Safetensors
MLX
gemma3_text
gemma3
gemma
google
functiongemma
conversational
text-generation-inference
6-bit
Instructions to use lmstudio-community/functiongemma-270m-it-MLX-6bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lmstudio-community/functiongemma-270m-it-MLX-6bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="lmstudio-community/functiongemma-270m-it-MLX-6bit") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("lmstudio-community/functiongemma-270m-it-MLX-6bit") model = AutoModelForCausalLM.from_pretrained("lmstudio-community/functiongemma-270m-it-MLX-6bit") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - MLX
How to use lmstudio-community/functiongemma-270m-it-MLX-6bit with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("lmstudio-community/functiongemma-270m-it-MLX-6bit") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- LM Studio
- vLLM
How to use lmstudio-community/functiongemma-270m-it-MLX-6bit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "lmstudio-community/functiongemma-270m-it-MLX-6bit" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lmstudio-community/functiongemma-270m-it-MLX-6bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/lmstudio-community/functiongemma-270m-it-MLX-6bit
- SGLang
How to use lmstudio-community/functiongemma-270m-it-MLX-6bit with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "lmstudio-community/functiongemma-270m-it-MLX-6bit" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lmstudio-community/functiongemma-270m-it-MLX-6bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "lmstudio-community/functiongemma-270m-it-MLX-6bit" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lmstudio-community/functiongemma-270m-it-MLX-6bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Pi new
How to use lmstudio-community/functiongemma-270m-it-MLX-6bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "lmstudio-community/functiongemma-270m-it-MLX-6bit"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "lmstudio-community/functiongemma-270m-it-MLX-6bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use lmstudio-community/functiongemma-270m-it-MLX-6bit with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "lmstudio-community/functiongemma-270m-it-MLX-6bit"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default lmstudio-community/functiongemma-270m-it-MLX-6bit
Run Hermes
hermes
- MLX LM
How to use lmstudio-community/functiongemma-270m-it-MLX-6bit with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "lmstudio-community/functiongemma-270m-it-MLX-6bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "lmstudio-community/functiongemma-270m-it-MLX-6bit" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lmstudio-community/functiongemma-270m-it-MLX-6bit", "messages": [ {"role": "user", "content": "Hello"} ] }' - Docker Model Runner
How to use lmstudio-community/functiongemma-270m-it-MLX-6bit with Docker Model Runner:
docker model run hf.co/lmstudio-community/functiongemma-270m-it-MLX-6bit
Add files using upload-large-folder tool
Browse files- .gitattributes +1 -0
- README.md +36 -0
- chat_template.jinja +279 -0
- config.json +65 -0
- generation_config.json +12 -0
- model.safetensors +3 -0
- model.safetensors.index.json +498 -0
- tokenizer.json +3 -0
- tokenizer_config.json +28 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: gemma
|
| 3 |
+
tags:
|
| 4 |
+
- gemma3
|
| 5 |
+
- gemma
|
| 6 |
+
- google
|
| 7 |
+
- functiongemma
|
| 8 |
+
- mlx
|
| 9 |
+
pipeline_tag: text-generation
|
| 10 |
+
library_name: transformers
|
| 11 |
+
extra_gated_heading: Access Gemma on Hugging Face
|
| 12 |
+
extra_gated_prompt: To access FunctionGemma on Hugging Face, you’re required to review
|
| 13 |
+
and agree to Google’s usage license. To do this, please ensure you’re logged in
|
| 14 |
+
to Hugging Face and click below. Requests are processed immediately.
|
| 15 |
+
extra_gated_button_content: Acknowledge license
|
| 16 |
+
base_model: google/functiongemma-270m-it
|
| 17 |
+
---
|
| 18 |
+
## 💫 Community Model> functiongemma-270m-it by google
|
| 19 |
+
|
| 20 |
+
_👾 [LM Studio](https://lmstudio.ai) Community models highlights program. Highlighting new & noteworthy models by the community. Join the conversation on [Discord](https://discord.gg/aPQfnNkxGC)_.
|
| 21 |
+
|
| 22 |
+
**Model creator**: [google](https://huggingface.co/google)<br>
|
| 23 |
+
**Original model**: [functiongemma-270m-it](https://huggingface.co/google/functiongemma-270m-it)<br>
|
| 24 |
+
**MLX quantization**: provided by [LM Studio team](https://x.com/lmstudio) using [mlx_lm](https://github.com/ml-explore/mlx-lm)<br>
|
| 25 |
+
|
| 26 |
+
## Technical Details
|
| 27 |
+
|
| 28 |
+
6-bit quantized version of functiongemma-270m-it using MLX, optimized for Apple Silicon.
|
| 29 |
+
|
| 30 |
+
## Special thanks
|
| 31 |
+
|
| 32 |
+
🙏 Special thanks to the [Apple Machine Learning Research](https://github.com/ml-explore) team for creating [MLX](https://github.com/ml-explore/mlx).
|
| 33 |
+
|
| 34 |
+
## Disclaimers
|
| 35 |
+
|
| 36 |
+
LM Studio is not the creator, originator, or owner of any Model featured in the Community Model Program. Each Community Model is created and provided by third parties. LM Studio does not endorse, support, represent or guarantee the completeness, truthfulness, accuracy, or reliability of any Community Model. You understand that Community Models can produce content that might be offensive, harmful, inaccurate or otherwise inappropriate, or deceptive. Each Community Model is the sole responsibility of the person or entity who originated such Model. LM Studio may not monitor or control the Community Models and cannot, and does not, take responsibility for any such Model. LM Studio disclaims all warranties or guarantees about the accuracy, reliability or benefits of the Community Models. LM Studio further disclaims any warranty that the Community Model will meet your requirements, be secure, uninterrupted or available at any time or location, or error-free, viruses-free, or that any errors will be corrected, or otherwise. You will be solely responsible for any damage resulting from your use of or access to the Community Models, your downloading of any Community Model, or use of any other Community Model provided by or through LM Studio.
|
chat_template.jinja
ADDED
|
@@ -0,0 +1,279 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{%- macro format_parameters(properties, required) -%}
|
| 2 |
+
{%- set standard_keys = ['description', 'type', 'properties', 'required', 'nullable'] -%}
|
| 3 |
+
{%- set ns = namespace(found_first=false) -%}
|
| 4 |
+
{%- for key, value in properties | dictsort -%}
|
| 5 |
+
{%- if key not in standard_keys -%}
|
| 6 |
+
{%- if ns.found_first %},{% endif -%}
|
| 7 |
+
{%- set ns.found_first = true -%}
|
| 8 |
+
{{- key }}:{description:<escape>{{ value['description'] }}<escape>
|
| 9 |
+
{%- if value['type'] | upper == 'STRING' -%}
|
| 10 |
+
{%- if value['enum'] -%}
|
| 11 |
+
,enum:{{ format_argument(value['enum']) }}
|
| 12 |
+
{%- endif -%}
|
| 13 |
+
{%- elif value['type'] | upper == 'OBJECT' -%}
|
| 14 |
+
,properties:{
|
| 15 |
+
{%- if value['properties'] is defined and value['properties'] is mapping -%}
|
| 16 |
+
{{- format_parameters(value['properties'], value['required'] | default([])) -}}
|
| 17 |
+
{%- elif value is mapping -%}
|
| 18 |
+
{{- format_parameters(value, value['required'] | default([])) -}}
|
| 19 |
+
{%- endif -%}
|
| 20 |
+
}
|
| 21 |
+
{%- if value['required'] -%}
|
| 22 |
+
,required:[
|
| 23 |
+
{%- for item in value['required'] | default([]) -%}
|
| 24 |
+
<escape>{{- item -}}<escape>
|
| 25 |
+
{%- if not loop.last %},{% endif -%}
|
| 26 |
+
{%- endfor -%}
|
| 27 |
+
]
|
| 28 |
+
{%- endif -%}
|
| 29 |
+
{%- elif value['type'] | upper == 'ARRAY' -%}
|
| 30 |
+
{%- if value['items'] is mapping and value['items'] -%}
|
| 31 |
+
,items:{
|
| 32 |
+
{%- set ns_items = namespace(found_first=false) -%}
|
| 33 |
+
{%- for item_key, item_value in value['items'] | dictsort -%}
|
| 34 |
+
{%- if item_value is not none -%}
|
| 35 |
+
{%- if ns_items.found_first %},{% endif -%}
|
| 36 |
+
{%- set ns_items.found_first = true -%}
|
| 37 |
+
{%- if item_key == 'properties' -%}
|
| 38 |
+
properties:{
|
| 39 |
+
{%- if item_value is mapping -%}
|
| 40 |
+
{{- format_parameters(item_value, value['items']['required'] | default([])) -}}
|
| 41 |
+
{%- endif -%}
|
| 42 |
+
}
|
| 43 |
+
{%- elif item_key == 'required' -%}
|
| 44 |
+
required:[
|
| 45 |
+
{%- for req_item in item_value -%}
|
| 46 |
+
<escape>{{- req_item -}}<escape>
|
| 47 |
+
{%- if not loop.last %},{% endif -%}
|
| 48 |
+
{%- endfor -%}
|
| 49 |
+
]
|
| 50 |
+
{%- elif item_key == 'type' -%}
|
| 51 |
+
{%- if item_value is string -%}
|
| 52 |
+
type:{{ format_argument(item_value | upper) }}
|
| 53 |
+
{%- else -%}
|
| 54 |
+
type:{{ format_argument(item_value | map('upper') | list) }}
|
| 55 |
+
{%- endif -%}
|
| 56 |
+
{%- else -%}
|
| 57 |
+
{{ item_key }}:{{ format_argument(item_value) }}
|
| 58 |
+
{%- endif -%}
|
| 59 |
+
{%- endif -%}
|
| 60 |
+
{%- endfor -%}
|
| 61 |
+
}
|
| 62 |
+
{%- endif -%}
|
| 63 |
+
{%- endif -%}
|
| 64 |
+
,type:<escape>{{ value['type'] | upper }}<escape>}
|
| 65 |
+
{%- endif -%}
|
| 66 |
+
{%- endfor -%}
|
| 67 |
+
{%- endmacro -%}
|
| 68 |
+
{% macro format_function_declaration(tool_data) -%}
|
| 69 |
+
declaration:{{- tool_data['function']['name'] -}}
|
| 70 |
+
{description:<escape>{{- tool_data['function']['description'] -}}<escape>
|
| 71 |
+
{%- set params = tool_data['function']['parameters'] -%}
|
| 72 |
+
{%- if params -%}
|
| 73 |
+
,parameters:{
|
| 74 |
+
{%- if params['properties'] -%}
|
| 75 |
+
properties:{ {{- format_parameters(params['properties'], params['required']) -}} },
|
| 76 |
+
{%- endif -%}
|
| 77 |
+
{%- if params['required'] -%}
|
| 78 |
+
required:[
|
| 79 |
+
{%- for item in params['required'] -%}
|
| 80 |
+
<escape>{{- item -}}<escape>
|
| 81 |
+
{{- ',' if not loop.last -}}
|
| 82 |
+
{%- endfor -%}
|
| 83 |
+
],
|
| 84 |
+
{%- endif -%}
|
| 85 |
+
{%- if params['type'] -%}
|
| 86 |
+
type:<escape>{{- params['type'] | upper -}}<escape>}
|
| 87 |
+
{%- endif -%}
|
| 88 |
+
{%- endif -%}
|
| 89 |
+
}
|
| 90 |
+
{%- endmacro -%}
|
| 91 |
+
{% macro format_argument(argument, escape_keys=True) -%}
|
| 92 |
+
{%- if argument is string -%}
|
| 93 |
+
{{- '<escape>' + argument + '<escape>' -}}
|
| 94 |
+
{%- elif argument is boolean -%}
|
| 95 |
+
{%- if argument -%}
|
| 96 |
+
{{- 'true' -}}
|
| 97 |
+
{%- else -%}
|
| 98 |
+
{{- 'false' -}}
|
| 99 |
+
{%- endif -%}
|
| 100 |
+
{%- elif argument is mapping -%}
|
| 101 |
+
{{- '{' -}}
|
| 102 |
+
{%- set ns = namespace(found_first=false) -%}
|
| 103 |
+
{%- for key, value in argument | dictsort -%}
|
| 104 |
+
{%- if ns.found_first %},{% endif -%}
|
| 105 |
+
{%- set ns.found_first = true -%}
|
| 106 |
+
{%- if escape_keys -%}
|
| 107 |
+
{{- '<escape>' + key + '<escape>' -}}
|
| 108 |
+
{%- else -%}
|
| 109 |
+
{{- key -}}
|
| 110 |
+
{%- endif -%}
|
| 111 |
+
:{{- format_argument(value, escape_keys=escape_keys) -}}
|
| 112 |
+
{%- endfor -%}
|
| 113 |
+
{{- '}' -}}
|
| 114 |
+
{%- elif argument is sequence -%}
|
| 115 |
+
{{- '[' -}}
|
| 116 |
+
{%- for item in argument -%}
|
| 117 |
+
{{- format_argument(item, escape_keys=escape_keys) -}}
|
| 118 |
+
{%- if not loop.last %},{% endif -%}
|
| 119 |
+
{%- endfor -%}
|
| 120 |
+
{{- ']' -}}
|
| 121 |
+
{%- else -%}
|
| 122 |
+
{{- argument -}}
|
| 123 |
+
{%- endif -%}
|
| 124 |
+
{%- endmacro -%}
|
| 125 |
+
{{ bos_token }}
|
| 126 |
+
{%- set ns = namespace(prev_message_type=None) -%}
|
| 127 |
+
{#- Tool Declarations -#}
|
| 128 |
+
{%- set loop_messages = messages -%}
|
| 129 |
+
{%- if tools or messages[0]['role'] == 'system' or messages[0]['role'] == 'developer' -%}
|
| 130 |
+
{{- '<start_of_turn>developer\n' -}}
|
| 131 |
+
{%- if messages[0]['role'] == 'system' or messages[0]['role'] == 'developer' -%}
|
| 132 |
+
{%- if messages[0]['content'] is string -%}
|
| 133 |
+
{{- messages[0]['content'] | trim -}}
|
| 134 |
+
{%- elif messages[0]['content'] is sequence -%}
|
| 135 |
+
{%- for item in messages[0]['content'] -%}
|
| 136 |
+
{%- if item['type'] == 'text' -%}
|
| 137 |
+
{{- item['text'] | trim -}}
|
| 138 |
+
{%- endif -%}
|
| 139 |
+
{%- endfor -%}
|
| 140 |
+
{%- endif -%}
|
| 141 |
+
{%- set loop_messages = messages[1:] -%}
|
| 142 |
+
{%- endif -%}
|
| 143 |
+
{%- if tools -%}
|
| 144 |
+
{%- for tool in tools %}
|
| 145 |
+
{{- '<start_function_declaration>' -}}
|
| 146 |
+
{{- format_function_declaration(tool) | trim }}
|
| 147 |
+
{{- '<end_function_declaration>' -}}
|
| 148 |
+
{%- endfor %}
|
| 149 |
+
{%- endif -%}
|
| 150 |
+
{{- '<end_of_turn>\n' }}
|
| 151 |
+
{%- endif %}
|
| 152 |
+
{#- Loop through messages. -#}
|
| 153 |
+
{%- for message in loop_messages -%}
|
| 154 |
+
{%- if (message['role'] == 'assistant') -%}
|
| 155 |
+
{#- Rename "assistant" to "model". -#}
|
| 156 |
+
{%- set role = "model" -%}
|
| 157 |
+
{%- else -%}
|
| 158 |
+
{%- set role = message['role'] -%}
|
| 159 |
+
{%- endif -%}
|
| 160 |
+
{%- if role != 'tool' -%}
|
| 161 |
+
{%- if ns.prev_message_type != 'tool_response' -%}
|
| 162 |
+
{{- '<start_of_turn>' + role + '\n' }}
|
| 163 |
+
{%- endif -%}
|
| 164 |
+
{%- set ns.prev_message_type = None -%}
|
| 165 |
+
{%- if 'content' in message and message['content'] is not none -%}
|
| 166 |
+
{%- if message['content'] is string -%}
|
| 167 |
+
{{ message['content'] | trim }}
|
| 168 |
+
{%- elif message['content'] is sequence -%}
|
| 169 |
+
{%- for item in message['content'] -%}
|
| 170 |
+
{%- if item['type'] == 'image' -%}
|
| 171 |
+
{{ '<start_of_image>' }}
|
| 172 |
+
{%- elif item['type'] == 'text' -%}
|
| 173 |
+
{{ item['text'] | trim }}
|
| 174 |
+
{%- endif -%}
|
| 175 |
+
{%- endfor -%}
|
| 176 |
+
{%- else -%}
|
| 177 |
+
{{ raise_exception("Invalid content type in user/assistant message") }}
|
| 178 |
+
{%- endif -%}
|
| 179 |
+
{%- set ns.prev_message_type = 'content' -%}
|
| 180 |
+
{%- endif -%}
|
| 181 |
+
{%- if 'tool_calls' in message and message['tool_calls'] and message['tool_calls'] is iterable -%}
|
| 182 |
+
{#- Tool Calls -#}
|
| 183 |
+
{%- for tool_call in message['tool_calls'] -%}
|
| 184 |
+
{% set function = tool_call['function'] %}
|
| 185 |
+
{{- '<start_function_call>call:' + function['name'] + '{' -}}
|
| 186 |
+
{%- if 'arguments' in function -%}
|
| 187 |
+
{%- if function['arguments'] is mapping -%}
|
| 188 |
+
{%- set ns = namespace(found_first=false) -%}
|
| 189 |
+
{%- for key, value in function['arguments'] | dictsort -%}
|
| 190 |
+
{%- if ns.found_first %},{% endif -%}
|
| 191 |
+
{%- set ns.found_first = true -%}
|
| 192 |
+
{{- key -}}:{{- format_argument(value, escape_keys=False) -}}
|
| 193 |
+
{%- endfor -%}
|
| 194 |
+
{%- elif function['arguments'] is string -%}
|
| 195 |
+
{# This handles string-JSON, just in case #}
|
| 196 |
+
{{ function['arguments'] }}
|
| 197 |
+
{%- endif %}
|
| 198 |
+
{%- endif -%}
|
| 199 |
+
{{- '}<end_function_call>' -}}
|
| 200 |
+
{%- endfor -%}
|
| 201 |
+
{%- if loop.last -%}
|
| 202 |
+
{{ '<start_function_response>' }}
|
| 203 |
+
{%- endif -%}
|
| 204 |
+
{%- set ns.prev_message_type = 'tool_call' -%}
|
| 205 |
+
{%- endif -%}
|
| 206 |
+
{%- else -%}
|
| 207 |
+
{#- Tool Responses -#}
|
| 208 |
+
{%- if 'content' in message and message['content'] -%}
|
| 209 |
+
{%- if message['content'] is mapping -%}
|
| 210 |
+
{%- if 'name' in message['content'] and 'response' in message['content'] -%}
|
| 211 |
+
{{ '<start_function_response>response:' + message['content']['name'] | trim + '{' }}
|
| 212 |
+
{%- set response_ns = namespace(found_first=false) -%}
|
| 213 |
+
{%- for key, value in message['content']['response'] | dictsort -%}
|
| 214 |
+
{%- if response_ns.found_first %},{% endif -%}
|
| 215 |
+
{%- set response_ns.found_first = true -%}
|
| 216 |
+
{{- key -}}:{{- format_argument(value, escape_keys=False) -}}
|
| 217 |
+
{%- endfor -%}
|
| 218 |
+
{{- '}<end_function_response>' -}}
|
| 219 |
+
{%- elif 'name' in message -%}
|
| 220 |
+
{{ '<start_function_response>response:' + message['name'] | trim + '{' }}
|
| 221 |
+
{%- set response_ns = namespace(found_first=false) -%}
|
| 222 |
+
{%- for key, value in message['content'] | dictsort -%}
|
| 223 |
+
{%- if response_ns.found_first %},{% endif -%}
|
| 224 |
+
{%- set response_ns.found_first = true -%}
|
| 225 |
+
{{- key -}}:{{- format_argument(value, escape_keys=False) -}}
|
| 226 |
+
{%- endfor -%}
|
| 227 |
+
{{- '}<end_function_response>' -}}
|
| 228 |
+
{%- else -%}
|
| 229 |
+
{{ raise_exception("Invalid tool response mapping: must contain 'name' and 'response' keys, or 'name' must be in the message.") }}
|
| 230 |
+
{%- endif -%}
|
| 231 |
+
{%- elif message['content'] is string -%}
|
| 232 |
+
{%- if 'name' in message -%}
|
| 233 |
+
{{ '<start_function_response>response:' + message['name'] | trim + '{value:' + format_argument(message['content'], escape_keys=False) + '}<end_function_response>' }}
|
| 234 |
+
{%- else -%}
|
| 235 |
+
{{ raise_exception("Invalid tool response: 'name' must be provided.") }}
|
| 236 |
+
{%- endif -%}
|
| 237 |
+
{%- elif message['content'] is sequence -%}
|
| 238 |
+
{%- for item in message['content'] -%}
|
| 239 |
+
{%- if item is mapping -%}
|
| 240 |
+
{%- if 'name' in item and 'response' in item -%}
|
| 241 |
+
{{ '<start_function_response>response:' + item['name'] | trim + '{' }}
|
| 242 |
+
{%- set response_ns = namespace(found_first=false) -%}
|
| 243 |
+
{%- for key, value in item['response'] | dictsort -%}
|
| 244 |
+
{%- if response_ns.found_first %},{% endif -%}
|
| 245 |
+
{%- set response_ns.found_first = true -%}
|
| 246 |
+
{{- key -}}:{{- format_argument(value, escape_keys=False) -}}
|
| 247 |
+
{%- endfor -%}
|
| 248 |
+
{{- '}<end_function_response>' -}}
|
| 249 |
+
{%- elif 'name' in message -%}
|
| 250 |
+
{{ '<start_function_response>response:' + message['name'] | trim + '{' }}
|
| 251 |
+
{%- set response_ns = namespace(found_first=false) -%}
|
| 252 |
+
{%- for key, value in item | dictsort -%}
|
| 253 |
+
{%- if response_ns.found_first %},{% endif -%}
|
| 254 |
+
{%- set response_ns.found_first = true -%}
|
| 255 |
+
{{- key -}}:{{- format_argument(value, escape_keys=False) -}}
|
| 256 |
+
{%- endfor -%}
|
| 257 |
+
{{- '}<end_function_response>' -}}
|
| 258 |
+
{%- else -%}
|
| 259 |
+
{{ raise_exception("Invalid tool response mapping: must contain 'name' and 'response' keys, or 'name' must be in the message.") }}
|
| 260 |
+
{%- endif -%}
|
| 261 |
+
{%- else -%}
|
| 262 |
+
{{ raise_exception("Invalid tool response message: multiple responses must all be mappings") }}
|
| 263 |
+
{%- endif -%}
|
| 264 |
+
{%- endfor -%}
|
| 265 |
+
{%- else -%}
|
| 266 |
+
{{ raise_exception("Invalid content type in tool message: must be mapping, sequence of mappings, or string.") }}
|
| 267 |
+
{%- endif -%}
|
| 268 |
+
{%- endif -%}
|
| 269 |
+
{%- set ns.prev_message_type = 'tool_response' -%}
|
| 270 |
+
{%- endif -%}
|
| 271 |
+
{%- if ns.prev_message_type not in ['tool_call', 'tool_response'] -%}
|
| 272 |
+
{{ '<end_of_turn>\n' }}
|
| 273 |
+
{%- endif -%}
|
| 274 |
+
{%- endfor -%}
|
| 275 |
+
{%- if add_generation_prompt -%}
|
| 276 |
+
{%- if ns.prev_message_type != 'tool_response' -%}
|
| 277 |
+
{{- '<start_of_turn>model\n' -}}
|
| 278 |
+
{%- endif -%}
|
| 279 |
+
{%- endif -%}
|
config.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_sliding_window_pattern": 6,
|
| 3 |
+
"architectures": [
|
| 4 |
+
"Gemma3ForCausalLM"
|
| 5 |
+
],
|
| 6 |
+
"attention_bias": false,
|
| 7 |
+
"attention_dropout": 0.0,
|
| 8 |
+
"attn_logit_softcapping": null,
|
| 9 |
+
"bos_token_id": 2,
|
| 10 |
+
"dtype": "bfloat16",
|
| 11 |
+
"eos_token_id": 1,
|
| 12 |
+
"final_logit_softcapping": null,
|
| 13 |
+
"head_dim": 256,
|
| 14 |
+
"hidden_activation": "gelu_pytorch_tanh",
|
| 15 |
+
"hidden_size": 640,
|
| 16 |
+
"initializer_range": 0.02,
|
| 17 |
+
"intermediate_size": 2048,
|
| 18 |
+
"layer_types": [
|
| 19 |
+
"sliding_attention",
|
| 20 |
+
"sliding_attention",
|
| 21 |
+
"sliding_attention",
|
| 22 |
+
"sliding_attention",
|
| 23 |
+
"sliding_attention",
|
| 24 |
+
"full_attention",
|
| 25 |
+
"sliding_attention",
|
| 26 |
+
"sliding_attention",
|
| 27 |
+
"sliding_attention",
|
| 28 |
+
"sliding_attention",
|
| 29 |
+
"sliding_attention",
|
| 30 |
+
"full_attention",
|
| 31 |
+
"sliding_attention",
|
| 32 |
+
"sliding_attention",
|
| 33 |
+
"sliding_attention",
|
| 34 |
+
"sliding_attention",
|
| 35 |
+
"sliding_attention",
|
| 36 |
+
"full_attention"
|
| 37 |
+
],
|
| 38 |
+
"max_position_embeddings": 32768,
|
| 39 |
+
"model_type": "gemma3_text",
|
| 40 |
+
"num_attention_heads": 4,
|
| 41 |
+
"num_hidden_layers": 18,
|
| 42 |
+
"num_key_value_heads": 1,
|
| 43 |
+
"pad_token_id": 0,
|
| 44 |
+
"quantization": {
|
| 45 |
+
"group_size": 64,
|
| 46 |
+
"bits": 6,
|
| 47 |
+
"mode": "affine"
|
| 48 |
+
},
|
| 49 |
+
"quantization_config": {
|
| 50 |
+
"group_size": 64,
|
| 51 |
+
"bits": 6,
|
| 52 |
+
"mode": "affine"
|
| 53 |
+
},
|
| 54 |
+
"query_pre_attn_scalar": 256,
|
| 55 |
+
"rms_norm_eps": 1e-06,
|
| 56 |
+
"rope_local_base_freq": 10000.0,
|
| 57 |
+
"rope_parameters": null,
|
| 58 |
+
"rope_scaling": null,
|
| 59 |
+
"rope_theta": 1000000.0,
|
| 60 |
+
"sliding_window": 512,
|
| 61 |
+
"transformers_version": "4.57.3",
|
| 62 |
+
"use_bidirectional_attention": false,
|
| 63 |
+
"use_cache": true,
|
| 64 |
+
"vocab_size": 262144
|
| 65 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cache_implementation": "hybrid",
|
| 3 |
+
"do_sample": true,
|
| 4 |
+
"eos_token_id": [
|
| 5 |
+
1,
|
| 6 |
+
50,
|
| 7 |
+
106
|
| 8 |
+
],
|
| 9 |
+
"top_k": 64,
|
| 10 |
+
"top_p": 0.95,
|
| 11 |
+
"transformers_version": "4.57.3"
|
| 12 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ff4a780e8eb2fb6263f79d5c66f57a0c9732936590ef01664e7a4456f7416f0c
|
| 3 |
+
size 217950339
|
model.safetensors.index.json
ADDED
|
@@ -0,0 +1,498 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"metadata": {
|
| 3 |
+
"total_size": 217896192,
|
| 4 |
+
"total_parameters": 268098176
|
| 5 |
+
},
|
| 6 |
+
"weight_map": {
|
| 7 |
+
"model.embed_tokens.biases": "model.safetensors",
|
| 8 |
+
"model.embed_tokens.scales": "model.safetensors",
|
| 9 |
+
"model.embed_tokens.weight": "model.safetensors",
|
| 10 |
+
"model.layers.0.input_layernorm.weight": "model.safetensors",
|
| 11 |
+
"model.layers.0.mlp.down_proj.biases": "model.safetensors",
|
| 12 |
+
"model.layers.0.mlp.down_proj.scales": "model.safetensors",
|
| 13 |
+
"model.layers.0.mlp.down_proj.weight": "model.safetensors",
|
| 14 |
+
"model.layers.0.mlp.gate_proj.biases": "model.safetensors",
|
| 15 |
+
"model.layers.0.mlp.gate_proj.scales": "model.safetensors",
|
| 16 |
+
"model.layers.0.mlp.gate_proj.weight": "model.safetensors",
|
| 17 |
+
"model.layers.0.mlp.up_proj.biases": "model.safetensors",
|
| 18 |
+
"model.layers.0.mlp.up_proj.scales": "model.safetensors",
|
| 19 |
+
"model.layers.0.mlp.up_proj.weight": "model.safetensors",
|
| 20 |
+
"model.layers.0.post_attention_layernorm.weight": "model.safetensors",
|
| 21 |
+
"model.layers.0.post_feedforward_layernorm.weight": "model.safetensors",
|
| 22 |
+
"model.layers.0.pre_feedforward_layernorm.weight": "model.safetensors",
|
| 23 |
+
"model.layers.0.self_attn.k_norm.weight": "model.safetensors",
|
| 24 |
+
"model.layers.0.self_attn.k_proj.biases": "model.safetensors",
|
| 25 |
+
"model.layers.0.self_attn.k_proj.scales": "model.safetensors",
|
| 26 |
+
"model.layers.0.self_attn.k_proj.weight": "model.safetensors",
|
| 27 |
+
"model.layers.0.self_attn.o_proj.biases": "model.safetensors",
|
| 28 |
+
"model.layers.0.self_attn.o_proj.scales": "model.safetensors",
|
| 29 |
+
"model.layers.0.self_attn.o_proj.weight": "model.safetensors",
|
| 30 |
+
"model.layers.0.self_attn.q_norm.weight": "model.safetensors",
|
| 31 |
+
"model.layers.0.self_attn.q_proj.biases": "model.safetensors",
|
| 32 |
+
"model.layers.0.self_attn.q_proj.scales": "model.safetensors",
|
| 33 |
+
"model.layers.0.self_attn.q_proj.weight": "model.safetensors",
|
| 34 |
+
"model.layers.0.self_attn.v_proj.biases": "model.safetensors",
|
| 35 |
+
"model.layers.0.self_attn.v_proj.scales": "model.safetensors",
|
| 36 |
+
"model.layers.0.self_attn.v_proj.weight": "model.safetensors",
|
| 37 |
+
"model.layers.1.input_layernorm.weight": "model.safetensors",
|
| 38 |
+
"model.layers.1.mlp.down_proj.biases": "model.safetensors",
|
| 39 |
+
"model.layers.1.mlp.down_proj.scales": "model.safetensors",
|
| 40 |
+
"model.layers.1.mlp.down_proj.weight": "model.safetensors",
|
| 41 |
+
"model.layers.1.mlp.gate_proj.biases": "model.safetensors",
|
| 42 |
+
"model.layers.1.mlp.gate_proj.scales": "model.safetensors",
|
| 43 |
+
"model.layers.1.mlp.gate_proj.weight": "model.safetensors",
|
| 44 |
+
"model.layers.1.mlp.up_proj.biases": "model.safetensors",
|
| 45 |
+
"model.layers.1.mlp.up_proj.scales": "model.safetensors",
|
| 46 |
+
"model.layers.1.mlp.up_proj.weight": "model.safetensors",
|
| 47 |
+
"model.layers.1.post_attention_layernorm.weight": "model.safetensors",
|
| 48 |
+
"model.layers.1.post_feedforward_layernorm.weight": "model.safetensors",
|
| 49 |
+
"model.layers.1.pre_feedforward_layernorm.weight": "model.safetensors",
|
| 50 |
+
"model.layers.1.self_attn.k_norm.weight": "model.safetensors",
|
| 51 |
+
"model.layers.1.self_attn.k_proj.biases": "model.safetensors",
|
| 52 |
+
"model.layers.1.self_attn.k_proj.scales": "model.safetensors",
|
| 53 |
+
"model.layers.1.self_attn.k_proj.weight": "model.safetensors",
|
| 54 |
+
"model.layers.1.self_attn.o_proj.biases": "model.safetensors",
|
| 55 |
+
"model.layers.1.self_attn.o_proj.scales": "model.safetensors",
|
| 56 |
+
"model.layers.1.self_attn.o_proj.weight": "model.safetensors",
|
| 57 |
+
"model.layers.1.self_attn.q_norm.weight": "model.safetensors",
|
| 58 |
+
"model.layers.1.self_attn.q_proj.biases": "model.safetensors",
|
| 59 |
+
"model.layers.1.self_attn.q_proj.scales": "model.safetensors",
|
| 60 |
+
"model.layers.1.self_attn.q_proj.weight": "model.safetensors",
|
| 61 |
+
"model.layers.1.self_attn.v_proj.biases": "model.safetensors",
|
| 62 |
+
"model.layers.1.self_attn.v_proj.scales": "model.safetensors",
|
| 63 |
+
"model.layers.1.self_attn.v_proj.weight": "model.safetensors",
|
| 64 |
+
"model.layers.10.input_layernorm.weight": "model.safetensors",
|
| 65 |
+
"model.layers.10.mlp.down_proj.biases": "model.safetensors",
|
| 66 |
+
"model.layers.10.mlp.down_proj.scales": "model.safetensors",
|
| 67 |
+
"model.layers.10.mlp.down_proj.weight": "model.safetensors",
|
| 68 |
+
"model.layers.10.mlp.gate_proj.biases": "model.safetensors",
|
| 69 |
+
"model.layers.10.mlp.gate_proj.scales": "model.safetensors",
|
| 70 |
+
"model.layers.10.mlp.gate_proj.weight": "model.safetensors",
|
| 71 |
+
"model.layers.10.mlp.up_proj.biases": "model.safetensors",
|
| 72 |
+
"model.layers.10.mlp.up_proj.scales": "model.safetensors",
|
| 73 |
+
"model.layers.10.mlp.up_proj.weight": "model.safetensors",
|
| 74 |
+
"model.layers.10.post_attention_layernorm.weight": "model.safetensors",
|
| 75 |
+
"model.layers.10.post_feedforward_layernorm.weight": "model.safetensors",
|
| 76 |
+
"model.layers.10.pre_feedforward_layernorm.weight": "model.safetensors",
|
| 77 |
+
"model.layers.10.self_attn.k_norm.weight": "model.safetensors",
|
| 78 |
+
"model.layers.10.self_attn.k_proj.biases": "model.safetensors",
|
| 79 |
+
"model.layers.10.self_attn.k_proj.scales": "model.safetensors",
|
| 80 |
+
"model.layers.10.self_attn.k_proj.weight": "model.safetensors",
|
| 81 |
+
"model.layers.10.self_attn.o_proj.biases": "model.safetensors",
|
| 82 |
+
"model.layers.10.self_attn.o_proj.scales": "model.safetensors",
|
| 83 |
+
"model.layers.10.self_attn.o_proj.weight": "model.safetensors",
|
| 84 |
+
"model.layers.10.self_attn.q_norm.weight": "model.safetensors",
|
| 85 |
+
"model.layers.10.self_attn.q_proj.biases": "model.safetensors",
|
| 86 |
+
"model.layers.10.self_attn.q_proj.scales": "model.safetensors",
|
| 87 |
+
"model.layers.10.self_attn.q_proj.weight": "model.safetensors",
|
| 88 |
+
"model.layers.10.self_attn.v_proj.biases": "model.safetensors",
|
| 89 |
+
"model.layers.10.self_attn.v_proj.scales": "model.safetensors",
|
| 90 |
+
"model.layers.10.self_attn.v_proj.weight": "model.safetensors",
|
| 91 |
+
"model.layers.11.input_layernorm.weight": "model.safetensors",
|
| 92 |
+
"model.layers.11.mlp.down_proj.biases": "model.safetensors",
|
| 93 |
+
"model.layers.11.mlp.down_proj.scales": "model.safetensors",
|
| 94 |
+
"model.layers.11.mlp.down_proj.weight": "model.safetensors",
|
| 95 |
+
"model.layers.11.mlp.gate_proj.biases": "model.safetensors",
|
| 96 |
+
"model.layers.11.mlp.gate_proj.scales": "model.safetensors",
|
| 97 |
+
"model.layers.11.mlp.gate_proj.weight": "model.safetensors",
|
| 98 |
+
"model.layers.11.mlp.up_proj.biases": "model.safetensors",
|
| 99 |
+
"model.layers.11.mlp.up_proj.scales": "model.safetensors",
|
| 100 |
+
"model.layers.11.mlp.up_proj.weight": "model.safetensors",
|
| 101 |
+
"model.layers.11.post_attention_layernorm.weight": "model.safetensors",
|
| 102 |
+
"model.layers.11.post_feedforward_layernorm.weight": "model.safetensors",
|
| 103 |
+
"model.layers.11.pre_feedforward_layernorm.weight": "model.safetensors",
|
| 104 |
+
"model.layers.11.self_attn.k_norm.weight": "model.safetensors",
|
| 105 |
+
"model.layers.11.self_attn.k_proj.biases": "model.safetensors",
|
| 106 |
+
"model.layers.11.self_attn.k_proj.scales": "model.safetensors",
|
| 107 |
+
"model.layers.11.self_attn.k_proj.weight": "model.safetensors",
|
| 108 |
+
"model.layers.11.self_attn.o_proj.biases": "model.safetensors",
|
| 109 |
+
"model.layers.11.self_attn.o_proj.scales": "model.safetensors",
|
| 110 |
+
"model.layers.11.self_attn.o_proj.weight": "model.safetensors",
|
| 111 |
+
"model.layers.11.self_attn.q_norm.weight": "model.safetensors",
|
| 112 |
+
"model.layers.11.self_attn.q_proj.biases": "model.safetensors",
|
| 113 |
+
"model.layers.11.self_attn.q_proj.scales": "model.safetensors",
|
| 114 |
+
"model.layers.11.self_attn.q_proj.weight": "model.safetensors",
|
| 115 |
+
"model.layers.11.self_attn.v_proj.biases": "model.safetensors",
|
| 116 |
+
"model.layers.11.self_attn.v_proj.scales": "model.safetensors",
|
| 117 |
+
"model.layers.11.self_attn.v_proj.weight": "model.safetensors",
|
| 118 |
+
"model.layers.12.input_layernorm.weight": "model.safetensors",
|
| 119 |
+
"model.layers.12.mlp.down_proj.biases": "model.safetensors",
|
| 120 |
+
"model.layers.12.mlp.down_proj.scales": "model.safetensors",
|
| 121 |
+
"model.layers.12.mlp.down_proj.weight": "model.safetensors",
|
| 122 |
+
"model.layers.12.mlp.gate_proj.biases": "model.safetensors",
|
| 123 |
+
"model.layers.12.mlp.gate_proj.scales": "model.safetensors",
|
| 124 |
+
"model.layers.12.mlp.gate_proj.weight": "model.safetensors",
|
| 125 |
+
"model.layers.12.mlp.up_proj.biases": "model.safetensors",
|
| 126 |
+
"model.layers.12.mlp.up_proj.scales": "model.safetensors",
|
| 127 |
+
"model.layers.12.mlp.up_proj.weight": "model.safetensors",
|
| 128 |
+
"model.layers.12.post_attention_layernorm.weight": "model.safetensors",
|
| 129 |
+
"model.layers.12.post_feedforward_layernorm.weight": "model.safetensors",
|
| 130 |
+
"model.layers.12.pre_feedforward_layernorm.weight": "model.safetensors",
|
| 131 |
+
"model.layers.12.self_attn.k_norm.weight": "model.safetensors",
|
| 132 |
+
"model.layers.12.self_attn.k_proj.biases": "model.safetensors",
|
| 133 |
+
"model.layers.12.self_attn.k_proj.scales": "model.safetensors",
|
| 134 |
+
"model.layers.12.self_attn.k_proj.weight": "model.safetensors",
|
| 135 |
+
"model.layers.12.self_attn.o_proj.biases": "model.safetensors",
|
| 136 |
+
"model.layers.12.self_attn.o_proj.scales": "model.safetensors",
|
| 137 |
+
"model.layers.12.self_attn.o_proj.weight": "model.safetensors",
|
| 138 |
+
"model.layers.12.self_attn.q_norm.weight": "model.safetensors",
|
| 139 |
+
"model.layers.12.self_attn.q_proj.biases": "model.safetensors",
|
| 140 |
+
"model.layers.12.self_attn.q_proj.scales": "model.safetensors",
|
| 141 |
+
"model.layers.12.self_attn.q_proj.weight": "model.safetensors",
|
| 142 |
+
"model.layers.12.self_attn.v_proj.biases": "model.safetensors",
|
| 143 |
+
"model.layers.12.self_attn.v_proj.scales": "model.safetensors",
|
| 144 |
+
"model.layers.12.self_attn.v_proj.weight": "model.safetensors",
|
| 145 |
+
"model.layers.13.input_layernorm.weight": "model.safetensors",
|
| 146 |
+
"model.layers.13.mlp.down_proj.biases": "model.safetensors",
|
| 147 |
+
"model.layers.13.mlp.down_proj.scales": "model.safetensors",
|
| 148 |
+
"model.layers.13.mlp.down_proj.weight": "model.safetensors",
|
| 149 |
+
"model.layers.13.mlp.gate_proj.biases": "model.safetensors",
|
| 150 |
+
"model.layers.13.mlp.gate_proj.scales": "model.safetensors",
|
| 151 |
+
"model.layers.13.mlp.gate_proj.weight": "model.safetensors",
|
| 152 |
+
"model.layers.13.mlp.up_proj.biases": "model.safetensors",
|
| 153 |
+
"model.layers.13.mlp.up_proj.scales": "model.safetensors",
|
| 154 |
+
"model.layers.13.mlp.up_proj.weight": "model.safetensors",
|
| 155 |
+
"model.layers.13.post_attention_layernorm.weight": "model.safetensors",
|
| 156 |
+
"model.layers.13.post_feedforward_layernorm.weight": "model.safetensors",
|
| 157 |
+
"model.layers.13.pre_feedforward_layernorm.weight": "model.safetensors",
|
| 158 |
+
"model.layers.13.self_attn.k_norm.weight": "model.safetensors",
|
| 159 |
+
"model.layers.13.self_attn.k_proj.biases": "model.safetensors",
|
| 160 |
+
"model.layers.13.self_attn.k_proj.scales": "model.safetensors",
|
| 161 |
+
"model.layers.13.self_attn.k_proj.weight": "model.safetensors",
|
| 162 |
+
"model.layers.13.self_attn.o_proj.biases": "model.safetensors",
|
| 163 |
+
"model.layers.13.self_attn.o_proj.scales": "model.safetensors",
|
| 164 |
+
"model.layers.13.self_attn.o_proj.weight": "model.safetensors",
|
| 165 |
+
"model.layers.13.self_attn.q_norm.weight": "model.safetensors",
|
| 166 |
+
"model.layers.13.self_attn.q_proj.biases": "model.safetensors",
|
| 167 |
+
"model.layers.13.self_attn.q_proj.scales": "model.safetensors",
|
| 168 |
+
"model.layers.13.self_attn.q_proj.weight": "model.safetensors",
|
| 169 |
+
"model.layers.13.self_attn.v_proj.biases": "model.safetensors",
|
| 170 |
+
"model.layers.13.self_attn.v_proj.scales": "model.safetensors",
|
| 171 |
+
"model.layers.13.self_attn.v_proj.weight": "model.safetensors",
|
| 172 |
+
"model.layers.14.input_layernorm.weight": "model.safetensors",
|
| 173 |
+
"model.layers.14.mlp.down_proj.biases": "model.safetensors",
|
| 174 |
+
"model.layers.14.mlp.down_proj.scales": "model.safetensors",
|
| 175 |
+
"model.layers.14.mlp.down_proj.weight": "model.safetensors",
|
| 176 |
+
"model.layers.14.mlp.gate_proj.biases": "model.safetensors",
|
| 177 |
+
"model.layers.14.mlp.gate_proj.scales": "model.safetensors",
|
| 178 |
+
"model.layers.14.mlp.gate_proj.weight": "model.safetensors",
|
| 179 |
+
"model.layers.14.mlp.up_proj.biases": "model.safetensors",
|
| 180 |
+
"model.layers.14.mlp.up_proj.scales": "model.safetensors",
|
| 181 |
+
"model.layers.14.mlp.up_proj.weight": "model.safetensors",
|
| 182 |
+
"model.layers.14.post_attention_layernorm.weight": "model.safetensors",
|
| 183 |
+
"model.layers.14.post_feedforward_layernorm.weight": "model.safetensors",
|
| 184 |
+
"model.layers.14.pre_feedforward_layernorm.weight": "model.safetensors",
|
| 185 |
+
"model.layers.14.self_attn.k_norm.weight": "model.safetensors",
|
| 186 |
+
"model.layers.14.self_attn.k_proj.biases": "model.safetensors",
|
| 187 |
+
"model.layers.14.self_attn.k_proj.scales": "model.safetensors",
|
| 188 |
+
"model.layers.14.self_attn.k_proj.weight": "model.safetensors",
|
| 189 |
+
"model.layers.14.self_attn.o_proj.biases": "model.safetensors",
|
| 190 |
+
"model.layers.14.self_attn.o_proj.scales": "model.safetensors",
|
| 191 |
+
"model.layers.14.self_attn.o_proj.weight": "model.safetensors",
|
| 192 |
+
"model.layers.14.self_attn.q_norm.weight": "model.safetensors",
|
| 193 |
+
"model.layers.14.self_attn.q_proj.biases": "model.safetensors",
|
| 194 |
+
"model.layers.14.self_attn.q_proj.scales": "model.safetensors",
|
| 195 |
+
"model.layers.14.self_attn.q_proj.weight": "model.safetensors",
|
| 196 |
+
"model.layers.14.self_attn.v_proj.biases": "model.safetensors",
|
| 197 |
+
"model.layers.14.self_attn.v_proj.scales": "model.safetensors",
|
| 198 |
+
"model.layers.14.self_attn.v_proj.weight": "model.safetensors",
|
| 199 |
+
"model.layers.15.input_layernorm.weight": "model.safetensors",
|
| 200 |
+
"model.layers.15.mlp.down_proj.biases": "model.safetensors",
|
| 201 |
+
"model.layers.15.mlp.down_proj.scales": "model.safetensors",
|
| 202 |
+
"model.layers.15.mlp.down_proj.weight": "model.safetensors",
|
| 203 |
+
"model.layers.15.mlp.gate_proj.biases": "model.safetensors",
|
| 204 |
+
"model.layers.15.mlp.gate_proj.scales": "model.safetensors",
|
| 205 |
+
"model.layers.15.mlp.gate_proj.weight": "model.safetensors",
|
| 206 |
+
"model.layers.15.mlp.up_proj.biases": "model.safetensors",
|
| 207 |
+
"model.layers.15.mlp.up_proj.scales": "model.safetensors",
|
| 208 |
+
"model.layers.15.mlp.up_proj.weight": "model.safetensors",
|
| 209 |
+
"model.layers.15.post_attention_layernorm.weight": "model.safetensors",
|
| 210 |
+
"model.layers.15.post_feedforward_layernorm.weight": "model.safetensors",
|
| 211 |
+
"model.layers.15.pre_feedforward_layernorm.weight": "model.safetensors",
|
| 212 |
+
"model.layers.15.self_attn.k_norm.weight": "model.safetensors",
|
| 213 |
+
"model.layers.15.self_attn.k_proj.biases": "model.safetensors",
|
| 214 |
+
"model.layers.15.self_attn.k_proj.scales": "model.safetensors",
|
| 215 |
+
"model.layers.15.self_attn.k_proj.weight": "model.safetensors",
|
| 216 |
+
"model.layers.15.self_attn.o_proj.biases": "model.safetensors",
|
| 217 |
+
"model.layers.15.self_attn.o_proj.scales": "model.safetensors",
|
| 218 |
+
"model.layers.15.self_attn.o_proj.weight": "model.safetensors",
|
| 219 |
+
"model.layers.15.self_attn.q_norm.weight": "model.safetensors",
|
| 220 |
+
"model.layers.15.self_attn.q_proj.biases": "model.safetensors",
|
| 221 |
+
"model.layers.15.self_attn.q_proj.scales": "model.safetensors",
|
| 222 |
+
"model.layers.15.self_attn.q_proj.weight": "model.safetensors",
|
| 223 |
+
"model.layers.15.self_attn.v_proj.biases": "model.safetensors",
|
| 224 |
+
"model.layers.15.self_attn.v_proj.scales": "model.safetensors",
|
| 225 |
+
"model.layers.15.self_attn.v_proj.weight": "model.safetensors",
|
| 226 |
+
"model.layers.16.input_layernorm.weight": "model.safetensors",
|
| 227 |
+
"model.layers.16.mlp.down_proj.biases": "model.safetensors",
|
| 228 |
+
"model.layers.16.mlp.down_proj.scales": "model.safetensors",
|
| 229 |
+
"model.layers.16.mlp.down_proj.weight": "model.safetensors",
|
| 230 |
+
"model.layers.16.mlp.gate_proj.biases": "model.safetensors",
|
| 231 |
+
"model.layers.16.mlp.gate_proj.scales": "model.safetensors",
|
| 232 |
+
"model.layers.16.mlp.gate_proj.weight": "model.safetensors",
|
| 233 |
+
"model.layers.16.mlp.up_proj.biases": "model.safetensors",
|
| 234 |
+
"model.layers.16.mlp.up_proj.scales": "model.safetensors",
|
| 235 |
+
"model.layers.16.mlp.up_proj.weight": "model.safetensors",
|
| 236 |
+
"model.layers.16.post_attention_layernorm.weight": "model.safetensors",
|
| 237 |
+
"model.layers.16.post_feedforward_layernorm.weight": "model.safetensors",
|
| 238 |
+
"model.layers.16.pre_feedforward_layernorm.weight": "model.safetensors",
|
| 239 |
+
"model.layers.16.self_attn.k_norm.weight": "model.safetensors",
|
| 240 |
+
"model.layers.16.self_attn.k_proj.biases": "model.safetensors",
|
| 241 |
+
"model.layers.16.self_attn.k_proj.scales": "model.safetensors",
|
| 242 |
+
"model.layers.16.self_attn.k_proj.weight": "model.safetensors",
|
| 243 |
+
"model.layers.16.self_attn.o_proj.biases": "model.safetensors",
|
| 244 |
+
"model.layers.16.self_attn.o_proj.scales": "model.safetensors",
|
| 245 |
+
"model.layers.16.self_attn.o_proj.weight": "model.safetensors",
|
| 246 |
+
"model.layers.16.self_attn.q_norm.weight": "model.safetensors",
|
| 247 |
+
"model.layers.16.self_attn.q_proj.biases": "model.safetensors",
|
| 248 |
+
"model.layers.16.self_attn.q_proj.scales": "model.safetensors",
|
| 249 |
+
"model.layers.16.self_attn.q_proj.weight": "model.safetensors",
|
| 250 |
+
"model.layers.16.self_attn.v_proj.biases": "model.safetensors",
|
| 251 |
+
"model.layers.16.self_attn.v_proj.scales": "model.safetensors",
|
| 252 |
+
"model.layers.16.self_attn.v_proj.weight": "model.safetensors",
|
| 253 |
+
"model.layers.17.input_layernorm.weight": "model.safetensors",
|
| 254 |
+
"model.layers.17.mlp.down_proj.biases": "model.safetensors",
|
| 255 |
+
"model.layers.17.mlp.down_proj.scales": "model.safetensors",
|
| 256 |
+
"model.layers.17.mlp.down_proj.weight": "model.safetensors",
|
| 257 |
+
"model.layers.17.mlp.gate_proj.biases": "model.safetensors",
|
| 258 |
+
"model.layers.17.mlp.gate_proj.scales": "model.safetensors",
|
| 259 |
+
"model.layers.17.mlp.gate_proj.weight": "model.safetensors",
|
| 260 |
+
"model.layers.17.mlp.up_proj.biases": "model.safetensors",
|
| 261 |
+
"model.layers.17.mlp.up_proj.scales": "model.safetensors",
|
| 262 |
+
"model.layers.17.mlp.up_proj.weight": "model.safetensors",
|
| 263 |
+
"model.layers.17.post_attention_layernorm.weight": "model.safetensors",
|
| 264 |
+
"model.layers.17.post_feedforward_layernorm.weight": "model.safetensors",
|
| 265 |
+
"model.layers.17.pre_feedforward_layernorm.weight": "model.safetensors",
|
| 266 |
+
"model.layers.17.self_attn.k_norm.weight": "model.safetensors",
|
| 267 |
+
"model.layers.17.self_attn.k_proj.biases": "model.safetensors",
|
| 268 |
+
"model.layers.17.self_attn.k_proj.scales": "model.safetensors",
|
| 269 |
+
"model.layers.17.self_attn.k_proj.weight": "model.safetensors",
|
| 270 |
+
"model.layers.17.self_attn.o_proj.biases": "model.safetensors",
|
| 271 |
+
"model.layers.17.self_attn.o_proj.scales": "model.safetensors",
|
| 272 |
+
"model.layers.17.self_attn.o_proj.weight": "model.safetensors",
|
| 273 |
+
"model.layers.17.self_attn.q_norm.weight": "model.safetensors",
|
| 274 |
+
"model.layers.17.self_attn.q_proj.biases": "model.safetensors",
|
| 275 |
+
"model.layers.17.self_attn.q_proj.scales": "model.safetensors",
|
| 276 |
+
"model.layers.17.self_attn.q_proj.weight": "model.safetensors",
|
| 277 |
+
"model.layers.17.self_attn.v_proj.biases": "model.safetensors",
|
| 278 |
+
"model.layers.17.self_attn.v_proj.scales": "model.safetensors",
|
| 279 |
+
"model.layers.17.self_attn.v_proj.weight": "model.safetensors",
|
| 280 |
+
"model.layers.2.input_layernorm.weight": "model.safetensors",
|
| 281 |
+
"model.layers.2.mlp.down_proj.biases": "model.safetensors",
|
| 282 |
+
"model.layers.2.mlp.down_proj.scales": "model.safetensors",
|
| 283 |
+
"model.layers.2.mlp.down_proj.weight": "model.safetensors",
|
| 284 |
+
"model.layers.2.mlp.gate_proj.biases": "model.safetensors",
|
| 285 |
+
"model.layers.2.mlp.gate_proj.scales": "model.safetensors",
|
| 286 |
+
"model.layers.2.mlp.gate_proj.weight": "model.safetensors",
|
| 287 |
+
"model.layers.2.mlp.up_proj.biases": "model.safetensors",
|
| 288 |
+
"model.layers.2.mlp.up_proj.scales": "model.safetensors",
|
| 289 |
+
"model.layers.2.mlp.up_proj.weight": "model.safetensors",
|
| 290 |
+
"model.layers.2.post_attention_layernorm.weight": "model.safetensors",
|
| 291 |
+
"model.layers.2.post_feedforward_layernorm.weight": "model.safetensors",
|
| 292 |
+
"model.layers.2.pre_feedforward_layernorm.weight": "model.safetensors",
|
| 293 |
+
"model.layers.2.self_attn.k_norm.weight": "model.safetensors",
|
| 294 |
+
"model.layers.2.self_attn.k_proj.biases": "model.safetensors",
|
| 295 |
+
"model.layers.2.self_attn.k_proj.scales": "model.safetensors",
|
| 296 |
+
"model.layers.2.self_attn.k_proj.weight": "model.safetensors",
|
| 297 |
+
"model.layers.2.self_attn.o_proj.biases": "model.safetensors",
|
| 298 |
+
"model.layers.2.self_attn.o_proj.scales": "model.safetensors",
|
| 299 |
+
"model.layers.2.self_attn.o_proj.weight": "model.safetensors",
|
| 300 |
+
"model.layers.2.self_attn.q_norm.weight": "model.safetensors",
|
| 301 |
+
"model.layers.2.self_attn.q_proj.biases": "model.safetensors",
|
| 302 |
+
"model.layers.2.self_attn.q_proj.scales": "model.safetensors",
|
| 303 |
+
"model.layers.2.self_attn.q_proj.weight": "model.safetensors",
|
| 304 |
+
"model.layers.2.self_attn.v_proj.biases": "model.safetensors",
|
| 305 |
+
"model.layers.2.self_attn.v_proj.scales": "model.safetensors",
|
| 306 |
+
"model.layers.2.self_attn.v_proj.weight": "model.safetensors",
|
| 307 |
+
"model.layers.3.input_layernorm.weight": "model.safetensors",
|
| 308 |
+
"model.layers.3.mlp.down_proj.biases": "model.safetensors",
|
| 309 |
+
"model.layers.3.mlp.down_proj.scales": "model.safetensors",
|
| 310 |
+
"model.layers.3.mlp.down_proj.weight": "model.safetensors",
|
| 311 |
+
"model.layers.3.mlp.gate_proj.biases": "model.safetensors",
|
| 312 |
+
"model.layers.3.mlp.gate_proj.scales": "model.safetensors",
|
| 313 |
+
"model.layers.3.mlp.gate_proj.weight": "model.safetensors",
|
| 314 |
+
"model.layers.3.mlp.up_proj.biases": "model.safetensors",
|
| 315 |
+
"model.layers.3.mlp.up_proj.scales": "model.safetensors",
|
| 316 |
+
"model.layers.3.mlp.up_proj.weight": "model.safetensors",
|
| 317 |
+
"model.layers.3.post_attention_layernorm.weight": "model.safetensors",
|
| 318 |
+
"model.layers.3.post_feedforward_layernorm.weight": "model.safetensors",
|
| 319 |
+
"model.layers.3.pre_feedforward_layernorm.weight": "model.safetensors",
|
| 320 |
+
"model.layers.3.self_attn.k_norm.weight": "model.safetensors",
|
| 321 |
+
"model.layers.3.self_attn.k_proj.biases": "model.safetensors",
|
| 322 |
+
"model.layers.3.self_attn.k_proj.scales": "model.safetensors",
|
| 323 |
+
"model.layers.3.self_attn.k_proj.weight": "model.safetensors",
|
| 324 |
+
"model.layers.3.self_attn.o_proj.biases": "model.safetensors",
|
| 325 |
+
"model.layers.3.self_attn.o_proj.scales": "model.safetensors",
|
| 326 |
+
"model.layers.3.self_attn.o_proj.weight": "model.safetensors",
|
| 327 |
+
"model.layers.3.self_attn.q_norm.weight": "model.safetensors",
|
| 328 |
+
"model.layers.3.self_attn.q_proj.biases": "model.safetensors",
|
| 329 |
+
"model.layers.3.self_attn.q_proj.scales": "model.safetensors",
|
| 330 |
+
"model.layers.3.self_attn.q_proj.weight": "model.safetensors",
|
| 331 |
+
"model.layers.3.self_attn.v_proj.biases": "model.safetensors",
|
| 332 |
+
"model.layers.3.self_attn.v_proj.scales": "model.safetensors",
|
| 333 |
+
"model.layers.3.self_attn.v_proj.weight": "model.safetensors",
|
| 334 |
+
"model.layers.4.input_layernorm.weight": "model.safetensors",
|
| 335 |
+
"model.layers.4.mlp.down_proj.biases": "model.safetensors",
|
| 336 |
+
"model.layers.4.mlp.down_proj.scales": "model.safetensors",
|
| 337 |
+
"model.layers.4.mlp.down_proj.weight": "model.safetensors",
|
| 338 |
+
"model.layers.4.mlp.gate_proj.biases": "model.safetensors",
|
| 339 |
+
"model.layers.4.mlp.gate_proj.scales": "model.safetensors",
|
| 340 |
+
"model.layers.4.mlp.gate_proj.weight": "model.safetensors",
|
| 341 |
+
"model.layers.4.mlp.up_proj.biases": "model.safetensors",
|
| 342 |
+
"model.layers.4.mlp.up_proj.scales": "model.safetensors",
|
| 343 |
+
"model.layers.4.mlp.up_proj.weight": "model.safetensors",
|
| 344 |
+
"model.layers.4.post_attention_layernorm.weight": "model.safetensors",
|
| 345 |
+
"model.layers.4.post_feedforward_layernorm.weight": "model.safetensors",
|
| 346 |
+
"model.layers.4.pre_feedforward_layernorm.weight": "model.safetensors",
|
| 347 |
+
"model.layers.4.self_attn.k_norm.weight": "model.safetensors",
|
| 348 |
+
"model.layers.4.self_attn.k_proj.biases": "model.safetensors",
|
| 349 |
+
"model.layers.4.self_attn.k_proj.scales": "model.safetensors",
|
| 350 |
+
"model.layers.4.self_attn.k_proj.weight": "model.safetensors",
|
| 351 |
+
"model.layers.4.self_attn.o_proj.biases": "model.safetensors",
|
| 352 |
+
"model.layers.4.self_attn.o_proj.scales": "model.safetensors",
|
| 353 |
+
"model.layers.4.self_attn.o_proj.weight": "model.safetensors",
|
| 354 |
+
"model.layers.4.self_attn.q_norm.weight": "model.safetensors",
|
| 355 |
+
"model.layers.4.self_attn.q_proj.biases": "model.safetensors",
|
| 356 |
+
"model.layers.4.self_attn.q_proj.scales": "model.safetensors",
|
| 357 |
+
"model.layers.4.self_attn.q_proj.weight": "model.safetensors",
|
| 358 |
+
"model.layers.4.self_attn.v_proj.biases": "model.safetensors",
|
| 359 |
+
"model.layers.4.self_attn.v_proj.scales": "model.safetensors",
|
| 360 |
+
"model.layers.4.self_attn.v_proj.weight": "model.safetensors",
|
| 361 |
+
"model.layers.5.input_layernorm.weight": "model.safetensors",
|
| 362 |
+
"model.layers.5.mlp.down_proj.biases": "model.safetensors",
|
| 363 |
+
"model.layers.5.mlp.down_proj.scales": "model.safetensors",
|
| 364 |
+
"model.layers.5.mlp.down_proj.weight": "model.safetensors",
|
| 365 |
+
"model.layers.5.mlp.gate_proj.biases": "model.safetensors",
|
| 366 |
+
"model.layers.5.mlp.gate_proj.scales": "model.safetensors",
|
| 367 |
+
"model.layers.5.mlp.gate_proj.weight": "model.safetensors",
|
| 368 |
+
"model.layers.5.mlp.up_proj.biases": "model.safetensors",
|
| 369 |
+
"model.layers.5.mlp.up_proj.scales": "model.safetensors",
|
| 370 |
+
"model.layers.5.mlp.up_proj.weight": "model.safetensors",
|
| 371 |
+
"model.layers.5.post_attention_layernorm.weight": "model.safetensors",
|
| 372 |
+
"model.layers.5.post_feedforward_layernorm.weight": "model.safetensors",
|
| 373 |
+
"model.layers.5.pre_feedforward_layernorm.weight": "model.safetensors",
|
| 374 |
+
"model.layers.5.self_attn.k_norm.weight": "model.safetensors",
|
| 375 |
+
"model.layers.5.self_attn.k_proj.biases": "model.safetensors",
|
| 376 |
+
"model.layers.5.self_attn.k_proj.scales": "model.safetensors",
|
| 377 |
+
"model.layers.5.self_attn.k_proj.weight": "model.safetensors",
|
| 378 |
+
"model.layers.5.self_attn.o_proj.biases": "model.safetensors",
|
| 379 |
+
"model.layers.5.self_attn.o_proj.scales": "model.safetensors",
|
| 380 |
+
"model.layers.5.self_attn.o_proj.weight": "model.safetensors",
|
| 381 |
+
"model.layers.5.self_attn.q_norm.weight": "model.safetensors",
|
| 382 |
+
"model.layers.5.self_attn.q_proj.biases": "model.safetensors",
|
| 383 |
+
"model.layers.5.self_attn.q_proj.scales": "model.safetensors",
|
| 384 |
+
"model.layers.5.self_attn.q_proj.weight": "model.safetensors",
|
| 385 |
+
"model.layers.5.self_attn.v_proj.biases": "model.safetensors",
|
| 386 |
+
"model.layers.5.self_attn.v_proj.scales": "model.safetensors",
|
| 387 |
+
"model.layers.5.self_attn.v_proj.weight": "model.safetensors",
|
| 388 |
+
"model.layers.6.input_layernorm.weight": "model.safetensors",
|
| 389 |
+
"model.layers.6.mlp.down_proj.biases": "model.safetensors",
|
| 390 |
+
"model.layers.6.mlp.down_proj.scales": "model.safetensors",
|
| 391 |
+
"model.layers.6.mlp.down_proj.weight": "model.safetensors",
|
| 392 |
+
"model.layers.6.mlp.gate_proj.biases": "model.safetensors",
|
| 393 |
+
"model.layers.6.mlp.gate_proj.scales": "model.safetensors",
|
| 394 |
+
"model.layers.6.mlp.gate_proj.weight": "model.safetensors",
|
| 395 |
+
"model.layers.6.mlp.up_proj.biases": "model.safetensors",
|
| 396 |
+
"model.layers.6.mlp.up_proj.scales": "model.safetensors",
|
| 397 |
+
"model.layers.6.mlp.up_proj.weight": "model.safetensors",
|
| 398 |
+
"model.layers.6.post_attention_layernorm.weight": "model.safetensors",
|
| 399 |
+
"model.layers.6.post_feedforward_layernorm.weight": "model.safetensors",
|
| 400 |
+
"model.layers.6.pre_feedforward_layernorm.weight": "model.safetensors",
|
| 401 |
+
"model.layers.6.self_attn.k_norm.weight": "model.safetensors",
|
| 402 |
+
"model.layers.6.self_attn.k_proj.biases": "model.safetensors",
|
| 403 |
+
"model.layers.6.self_attn.k_proj.scales": "model.safetensors",
|
| 404 |
+
"model.layers.6.self_attn.k_proj.weight": "model.safetensors",
|
| 405 |
+
"model.layers.6.self_attn.o_proj.biases": "model.safetensors",
|
| 406 |
+
"model.layers.6.self_attn.o_proj.scales": "model.safetensors",
|
| 407 |
+
"model.layers.6.self_attn.o_proj.weight": "model.safetensors",
|
| 408 |
+
"model.layers.6.self_attn.q_norm.weight": "model.safetensors",
|
| 409 |
+
"model.layers.6.self_attn.q_proj.biases": "model.safetensors",
|
| 410 |
+
"model.layers.6.self_attn.q_proj.scales": "model.safetensors",
|
| 411 |
+
"model.layers.6.self_attn.q_proj.weight": "model.safetensors",
|
| 412 |
+
"model.layers.6.self_attn.v_proj.biases": "model.safetensors",
|
| 413 |
+
"model.layers.6.self_attn.v_proj.scales": "model.safetensors",
|
| 414 |
+
"model.layers.6.self_attn.v_proj.weight": "model.safetensors",
|
| 415 |
+
"model.layers.7.input_layernorm.weight": "model.safetensors",
|
| 416 |
+
"model.layers.7.mlp.down_proj.biases": "model.safetensors",
|
| 417 |
+
"model.layers.7.mlp.down_proj.scales": "model.safetensors",
|
| 418 |
+
"model.layers.7.mlp.down_proj.weight": "model.safetensors",
|
| 419 |
+
"model.layers.7.mlp.gate_proj.biases": "model.safetensors",
|
| 420 |
+
"model.layers.7.mlp.gate_proj.scales": "model.safetensors",
|
| 421 |
+
"model.layers.7.mlp.gate_proj.weight": "model.safetensors",
|
| 422 |
+
"model.layers.7.mlp.up_proj.biases": "model.safetensors",
|
| 423 |
+
"model.layers.7.mlp.up_proj.scales": "model.safetensors",
|
| 424 |
+
"model.layers.7.mlp.up_proj.weight": "model.safetensors",
|
| 425 |
+
"model.layers.7.post_attention_layernorm.weight": "model.safetensors",
|
| 426 |
+
"model.layers.7.post_feedforward_layernorm.weight": "model.safetensors",
|
| 427 |
+
"model.layers.7.pre_feedforward_layernorm.weight": "model.safetensors",
|
| 428 |
+
"model.layers.7.self_attn.k_norm.weight": "model.safetensors",
|
| 429 |
+
"model.layers.7.self_attn.k_proj.biases": "model.safetensors",
|
| 430 |
+
"model.layers.7.self_attn.k_proj.scales": "model.safetensors",
|
| 431 |
+
"model.layers.7.self_attn.k_proj.weight": "model.safetensors",
|
| 432 |
+
"model.layers.7.self_attn.o_proj.biases": "model.safetensors",
|
| 433 |
+
"model.layers.7.self_attn.o_proj.scales": "model.safetensors",
|
| 434 |
+
"model.layers.7.self_attn.o_proj.weight": "model.safetensors",
|
| 435 |
+
"model.layers.7.self_attn.q_norm.weight": "model.safetensors",
|
| 436 |
+
"model.layers.7.self_attn.q_proj.biases": "model.safetensors",
|
| 437 |
+
"model.layers.7.self_attn.q_proj.scales": "model.safetensors",
|
| 438 |
+
"model.layers.7.self_attn.q_proj.weight": "model.safetensors",
|
| 439 |
+
"model.layers.7.self_attn.v_proj.biases": "model.safetensors",
|
| 440 |
+
"model.layers.7.self_attn.v_proj.scales": "model.safetensors",
|
| 441 |
+
"model.layers.7.self_attn.v_proj.weight": "model.safetensors",
|
| 442 |
+
"model.layers.8.input_layernorm.weight": "model.safetensors",
|
| 443 |
+
"model.layers.8.mlp.down_proj.biases": "model.safetensors",
|
| 444 |
+
"model.layers.8.mlp.down_proj.scales": "model.safetensors",
|
| 445 |
+
"model.layers.8.mlp.down_proj.weight": "model.safetensors",
|
| 446 |
+
"model.layers.8.mlp.gate_proj.biases": "model.safetensors",
|
| 447 |
+
"model.layers.8.mlp.gate_proj.scales": "model.safetensors",
|
| 448 |
+
"model.layers.8.mlp.gate_proj.weight": "model.safetensors",
|
| 449 |
+
"model.layers.8.mlp.up_proj.biases": "model.safetensors",
|
| 450 |
+
"model.layers.8.mlp.up_proj.scales": "model.safetensors",
|
| 451 |
+
"model.layers.8.mlp.up_proj.weight": "model.safetensors",
|
| 452 |
+
"model.layers.8.post_attention_layernorm.weight": "model.safetensors",
|
| 453 |
+
"model.layers.8.post_feedforward_layernorm.weight": "model.safetensors",
|
| 454 |
+
"model.layers.8.pre_feedforward_layernorm.weight": "model.safetensors",
|
| 455 |
+
"model.layers.8.self_attn.k_norm.weight": "model.safetensors",
|
| 456 |
+
"model.layers.8.self_attn.k_proj.biases": "model.safetensors",
|
| 457 |
+
"model.layers.8.self_attn.k_proj.scales": "model.safetensors",
|
| 458 |
+
"model.layers.8.self_attn.k_proj.weight": "model.safetensors",
|
| 459 |
+
"model.layers.8.self_attn.o_proj.biases": "model.safetensors",
|
| 460 |
+
"model.layers.8.self_attn.o_proj.scales": "model.safetensors",
|
| 461 |
+
"model.layers.8.self_attn.o_proj.weight": "model.safetensors",
|
| 462 |
+
"model.layers.8.self_attn.q_norm.weight": "model.safetensors",
|
| 463 |
+
"model.layers.8.self_attn.q_proj.biases": "model.safetensors",
|
| 464 |
+
"model.layers.8.self_attn.q_proj.scales": "model.safetensors",
|
| 465 |
+
"model.layers.8.self_attn.q_proj.weight": "model.safetensors",
|
| 466 |
+
"model.layers.8.self_attn.v_proj.biases": "model.safetensors",
|
| 467 |
+
"model.layers.8.self_attn.v_proj.scales": "model.safetensors",
|
| 468 |
+
"model.layers.8.self_attn.v_proj.weight": "model.safetensors",
|
| 469 |
+
"model.layers.9.input_layernorm.weight": "model.safetensors",
|
| 470 |
+
"model.layers.9.mlp.down_proj.biases": "model.safetensors",
|
| 471 |
+
"model.layers.9.mlp.down_proj.scales": "model.safetensors",
|
| 472 |
+
"model.layers.9.mlp.down_proj.weight": "model.safetensors",
|
| 473 |
+
"model.layers.9.mlp.gate_proj.biases": "model.safetensors",
|
| 474 |
+
"model.layers.9.mlp.gate_proj.scales": "model.safetensors",
|
| 475 |
+
"model.layers.9.mlp.gate_proj.weight": "model.safetensors",
|
| 476 |
+
"model.layers.9.mlp.up_proj.biases": "model.safetensors",
|
| 477 |
+
"model.layers.9.mlp.up_proj.scales": "model.safetensors",
|
| 478 |
+
"model.layers.9.mlp.up_proj.weight": "model.safetensors",
|
| 479 |
+
"model.layers.9.post_attention_layernorm.weight": "model.safetensors",
|
| 480 |
+
"model.layers.9.post_feedforward_layernorm.weight": "model.safetensors",
|
| 481 |
+
"model.layers.9.pre_feedforward_layernorm.weight": "model.safetensors",
|
| 482 |
+
"model.layers.9.self_attn.k_norm.weight": "model.safetensors",
|
| 483 |
+
"model.layers.9.self_attn.k_proj.biases": "model.safetensors",
|
| 484 |
+
"model.layers.9.self_attn.k_proj.scales": "model.safetensors",
|
| 485 |
+
"model.layers.9.self_attn.k_proj.weight": "model.safetensors",
|
| 486 |
+
"model.layers.9.self_attn.o_proj.biases": "model.safetensors",
|
| 487 |
+
"model.layers.9.self_attn.o_proj.scales": "model.safetensors",
|
| 488 |
+
"model.layers.9.self_attn.o_proj.weight": "model.safetensors",
|
| 489 |
+
"model.layers.9.self_attn.q_norm.weight": "model.safetensors",
|
| 490 |
+
"model.layers.9.self_attn.q_proj.biases": "model.safetensors",
|
| 491 |
+
"model.layers.9.self_attn.q_proj.scales": "model.safetensors",
|
| 492 |
+
"model.layers.9.self_attn.q_proj.weight": "model.safetensors",
|
| 493 |
+
"model.layers.9.self_attn.v_proj.biases": "model.safetensors",
|
| 494 |
+
"model.layers.9.self_attn.v_proj.scales": "model.safetensors",
|
| 495 |
+
"model.layers.9.self_attn.v_proj.weight": "model.safetensors",
|
| 496 |
+
"model.norm.weight": "model.safetensors"
|
| 497 |
+
}
|
| 498 |
+
}
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3b83627b470a2b3eeb6cbd480490191e50f21549cb3de1d0fcc1a001a48c6c04
|
| 3 |
+
size 33378493
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"additional_special_tokens": null,
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"boi_token": "<start_of_image>",
|
| 5 |
+
"bos_token": "<bos>",
|
| 6 |
+
"clean_up_tokenization_spaces": false,
|
| 7 |
+
"eoi_token": "<end_of_image>",
|
| 8 |
+
"eos_token": "<eos>",
|
| 9 |
+
"image_token": "<image_soft_token>",
|
| 10 |
+
"is_local": true,
|
| 11 |
+
"mask_token": "<mask>",
|
| 12 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 13 |
+
"model_specific_special_tokens": {
|
| 14 |
+
"boi_token": "<start_of_image>",
|
| 15 |
+
"eoi_token": "<end_of_image>",
|
| 16 |
+
"image_token": "<image_soft_token>",
|
| 17 |
+
"sfr_token": "<start_function_response>"
|
| 18 |
+
},
|
| 19 |
+
"pad_token": "<pad>",
|
| 20 |
+
"padding_side": "left",
|
| 21 |
+
"sfr_token": "<start_function_response>",
|
| 22 |
+
"sp_model_kwargs": null,
|
| 23 |
+
"spaces_between_special_tokens": false,
|
| 24 |
+
"tokenizer_class": "GemmaTokenizer",
|
| 25 |
+
"unk_token": "<unk>",
|
| 26 |
+
"use_default_system_prompt": false,
|
| 27 |
+
"chat_template": "{%- macro format_parameters(properties, required) -%}\n {%- set standard_keys = ['description', 'type', 'properties', 'required', 'nullable'] -%}\n {%- set ns = namespace(found_first=false) -%}\n {%- for key, value in properties | dictsort -%}\n {%- if key not in standard_keys -%}\n {%- if ns.found_first %},{% endif -%}\n {%- set ns.found_first = true -%}\n {{- key }}:{description:<escape>{{ value['description'] }}<escape>\n {%- if value['type'] | upper == 'STRING' -%}\n {%- if value['enum'] -%}\n ,enum:{{ format_argument(value['enum']) }}\n {%- endif -%}\n {%- elif value['type'] | upper == 'OBJECT' -%}\n ,properties:{\n {%- if value['properties'] is defined and value['properties'] is mapping -%}\n {{- format_parameters(value['properties'], value['required'] | default([])) -}}\n {%- elif value is mapping -%}\n {{- format_parameters(value, value['required'] | default([])) -}}\n {%- endif -%}\n }\n {%- if value['required'] -%}\n ,required:[\n {%- for item in value['required'] | default([]) -%}\n <escape>{{- item -}}<escape>\n {%- if not loop.last %},{% endif -%}\n {%- endfor -%}\n ]\n {%- endif -%}\n {%- elif value['type'] | upper == 'ARRAY' -%}\n {%- if value['items'] is mapping and value['items'] -%}\n ,items:{\n {%- set ns_items = namespace(found_first=false) -%}\n {%- for item_key, item_value in value['items'] | dictsort -%}\n {%- if item_value is not none -%}\n {%- if ns_items.found_first %},{% endif -%}\n {%- set ns_items.found_first = true -%}\n {%- if item_key == 'properties' -%}\n properties:{\n {%- if item_value is mapping -%}\n {{- format_parameters(item_value, value['items']['required'] | default([])) -}}\n {%- endif -%}\n }\n {%- elif item_key == 'required' -%}\n required:[\n {%- for req_item in item_value -%}\n <escape>{{- req_item -}}<escape>\n {%- if not loop.last %},{% endif -%}\n {%- endfor -%}\n ]\n {%- elif item_key == 'type' -%}\n {%- if item_value is string -%}\n type:{{ format_argument(item_value | upper) }}\n {%- else -%}\n type:{{ format_argument(item_value | map('upper') | list) }}\n {%- endif -%}\n {%- else -%}\n {{ item_key }}:{{ format_argument(item_value) }}\n {%- endif -%}\n {%- endif -%}\n {%- endfor -%}\n }\n {%- endif -%}\n {%- endif -%}\n ,type:<escape>{{ value['type'] | upper }}<escape>}\n {%- endif -%}\n {%- endfor -%}\n{%- endmacro -%}\n{% macro format_function_declaration(tool_data) -%}\ndeclaration:{{- tool_data['function']['name'] -}}\n{description:<escape>{{- tool_data['function']['description'] -}}<escape>\n{%- set params = tool_data['function']['parameters'] -%}\n{%- if params -%}\n ,parameters:{\n {%- if params['properties'] -%}\n properties:{ {{- format_parameters(params['properties'], params['required']) -}} },\n {%- endif -%}\n {%- if params['required'] -%}\n required:[\n {%- for item in params['required'] -%}\n <escape>{{- item -}}<escape>\n {{- ',' if not loop.last -}}\n {%- endfor -%}\n ],\n {%- endif -%}\n {%- if params['type'] -%}\n type:<escape>{{- params['type'] | upper -}}<escape>}\n {%- endif -%}\n{%- endif -%}\n}\n{%- endmacro -%}\n{% macro format_argument(argument, escape_keys=True) -%}\n{%- if argument is string -%}\n {{- '<escape>' + argument + '<escape>' -}}\n{%- elif argument is boolean -%}\n {%- if argument -%}\n {{- 'true' -}}\n {%- else -%}\n {{- 'false' -}}\n {%- endif -%}\n{%- elif argument is mapping -%}\n {{- '{' -}}\n {%- set ns = namespace(found_first=false) -%}\n {%- for key, value in argument | dictsort -%}\n {%- if ns.found_first %},{% endif -%}\n {%- set ns.found_first = true -%}\n {%- if escape_keys -%}\n {{- '<escape>' + key + '<escape>' -}}\n {%- else -%}\n {{- key -}}\n {%- endif -%}\n :{{- format_argument(value, escape_keys=escape_keys) -}}\n {%- endfor -%}\n {{- '}' -}}\n{%- elif argument is sequence -%}\n {{- '[' -}}\n {%- for item in argument -%}\n {{- format_argument(item, escape_keys=escape_keys) -}}\n {%- if not loop.last %},{% endif -%}\n {%- endfor -%}\n {{- ']' -}}\n{%- else -%}\n {{- argument -}}\n{%- endif -%}\n{%- endmacro -%}\n{{ bos_token }}\n{%- set ns = namespace(prev_message_type=None) -%}\n{#- Tool Declarations -#}\n{%- set loop_messages = messages -%}\n{%- if tools or messages[0]['role'] == 'system' or messages[0]['role'] == 'developer' -%}\n {{- '<start_of_turn>developer\\n' -}}\n {%- if messages[0]['role'] == 'system' or messages[0]['role'] == 'developer' -%}\n {%- if messages[0]['content'] is string -%}\n {{- messages[0]['content'] | trim -}}\n {%- elif messages[0]['content'] is sequence -%}\n {%- for item in messages[0]['content'] -%}\n {%- if item['type'] == 'text' -%}\n {{- item['text'] | trim -}}\n {%- endif -%}\n {%- endfor -%}\n {%- endif -%}\n {%- set loop_messages = messages[1:] -%}\n {%- endif -%}\n {%- if tools -%}\n {%- for tool in tools %}\n {{- '<start_function_declaration>' -}}\n {{- format_function_declaration(tool) | trim }}\n {{- '<end_function_declaration>' -}}\n {%- endfor %}\n {%- endif -%}\n {{- '<end_of_turn>\\n' }}\n{%- endif %}\n{#- Loop through messages. -#}\n{%- for message in loop_messages -%}\n {%- if (message['role'] == 'assistant') -%}\n {#- Rename \"assistant\" to \"model\". -#}\n {%- set role = \"model\" -%}\n {%- else -%}\n {%- set role = message['role'] -%}\n {%- endif -%}\n {%- if role != 'tool' -%}\n {%- if ns.prev_message_type != 'tool_response' -%}\n {{- '<start_of_turn>' + role + '\\n' }}\n {%- endif -%}\n {%- set ns.prev_message_type = None -%}\n {%- if 'content' in message and message['content'] is not none -%}\n {%- if message['content'] is string -%}\n {{ message['content'] | trim }}\n {%- elif message['content'] is sequence -%}\n {%- for item in message['content'] -%}\n {%- if item['type'] == 'image' -%}\n {{ '<start_of_image>' }}\n {%- elif item['type'] == 'text' -%}\n {{ item['text'] | trim }}\n {%- endif -%}\n {%- endfor -%}\n {%- else -%}\n {{ raise_exception(\"Invalid content type in user/assistant message\") }}\n {%- endif -%}\n {%- set ns.prev_message_type = 'content' -%}\n {%- endif -%}\n {%- if 'tool_calls' in message and message['tool_calls'] and message['tool_calls'] is iterable -%}\n {#- Tool Calls -#}\n {%- for tool_call in message['tool_calls'] -%}\n {% set function = tool_call['function'] %}\n {{- '<start_function_call>call:' + function['name'] + '{' -}}\n {%- if 'arguments' in function -%}\n {%- if function['arguments'] is mapping -%}\n {%- set ns = namespace(found_first=false) -%}\n {%- for key, value in function['arguments'] | dictsort -%}\n {%- if ns.found_first %},{% endif -%}\n {%- set ns.found_first = true -%}\n {{- key -}}:{{- format_argument(value, escape_keys=False) -}}\n {%- endfor -%}\n {%- elif function['arguments'] is string -%}\n {# This handles string-JSON, just in case #}\n {{ function['arguments'] }}\n {%- endif %}\n {%- endif -%}\n {{- '}<end_function_call>' -}}\n {%- endfor -%}\n {%- if loop.last -%}\n {{ '<start_function_response>' }}\n {%- endif -%}\n {%- set ns.prev_message_type = 'tool_call' -%}\n {%- endif -%}\n {%- else -%}\n {#- Tool Responses -#}\n {%- if 'content' in message and message['content'] -%}\n {%- if message['content'] is mapping -%}\n {%- if 'name' in message['content'] and 'response' in message['content'] -%}\n {{ '<start_function_response>response:' + message['content']['name'] | trim + '{' }}\n {%- set response_ns = namespace(found_first=false) -%}\n {%- for key, value in message['content']['response'] | dictsort -%}\n {%- if response_ns.found_first %},{% endif -%}\n {%- set response_ns.found_first = true -%}\n {{- key -}}:{{- format_argument(value, escape_keys=False) -}}\n {%- endfor -%}\n {{- '}<end_function_response>' -}}\n {%- elif 'name' in message -%}\n {{ '<start_function_response>response:' + message['name'] | trim + '{' }}\n {%- set response_ns = namespace(found_first=false) -%}\n {%- for key, value in message['content'] | dictsort -%}\n {%- if response_ns.found_first %},{% endif -%}\n {%- set response_ns.found_first = true -%}\n {{- key -}}:{{- format_argument(value, escape_keys=False) -}}\n {%- endfor -%}\n {{- '}<end_function_response>' -}}\n {%- else -%}\n {{ raise_exception(\"Invalid tool response mapping: must contain 'name' and 'response' keys, or 'name' must be in the message.\") }}\n {%- endif -%}\n {%- elif message['content'] is string -%}\n {%- if 'name' in message -%}\n {{ '<start_function_response>response:' + message['name'] | trim + '{value:' + format_argument(message['content'], escape_keys=False) + '}<end_function_response>' }}\n {%- else -%}\n {{ raise_exception(\"Invalid tool response: 'name' must be provided.\") }}\n {%- endif -%}\n {%- elif message['content'] is sequence -%}\n {%- for item in message['content'] -%}\n {%- if item is mapping -%}\n {%- if 'name' in item and 'response' in item -%}\n {{ '<start_function_response>response:' + item['name'] | trim + '{' }}\n {%- set response_ns = namespace(found_first=false) -%}\n {%- for key, value in item['response'] | dictsort -%}\n {%- if response_ns.found_first %},{% endif -%}\n {%- set response_ns.found_first = true -%}\n {{- key -}}:{{- format_argument(value, escape_keys=False) -}}\n {%- endfor -%}\n {{- '}<end_function_response>' -}}\n {%- elif 'name' in message -%}\n {{ '<start_function_response>response:' + message['name'] | trim + '{' }}\n {%- set response_ns = namespace(found_first=false) -%}\n {%- for key, value in item | dictsort -%}\n {%- if response_ns.found_first %},{% endif -%}\n {%- set response_ns.found_first = true -%}\n {{- key -}}:{{- format_argument(value, escape_keys=False) -}}\n {%- endfor -%}\n {{- '}<end_function_response>' -}}\n {%- else -%}\n {{ raise_exception(\"Invalid tool response mapping: must contain 'name' and 'response' keys, or 'name' must be in the message.\") }}\n {%- endif -%}\n {%- else -%}\n {{ raise_exception(\"Invalid tool response message: multiple responses must all be mappings\") }}\n {%- endif -%}\n {%- endfor -%}\n {%- else -%}\n {{ raise_exception(\"Invalid content type in tool message: must be mapping, sequence of mappings, or string.\") }}\n {%- endif -%}\n {%- endif -%}\n {%- set ns.prev_message_type = 'tool_response' -%}\n {%- endif -%}\n {%- if ns.prev_message_type not in ['tool_call', 'tool_response'] -%}\n {{ '<end_of_turn>\\n' }}\n {%- endif -%}\n{%- endfor -%}\n{%- if add_generation_prompt -%}\n {%- if ns.prev_message_type != 'tool_response' -%}\n {{- '<start_of_turn>model\\n' -}}\n {%- endif -%}\n{%- endif -%}\n"
|
| 28 |
+
}
|