Revert "Add files using upload-large-folder tool"
Browse filesThis reverts commit 9b14b73d637406ecfff2a2aefded6f3a3a2f22a3.
- README.md +154 -153
- chat_template.jinja +81 -171
- config.json +3 -3
- model-00001-of-00003.safetensors +0 -3
- model-00001-of-00009.safetensors +2 -2
- model-00002-of-00003.safetensors +0 -3
- model-00002-of-00009.safetensors +2 -2
- model-00003-of-00003.safetensors +0 -3
- model-00003-of-00009.safetensors +2 -2
- model-00004-of-00009.safetensors +2 -2
- model-00005-of-00009.safetensors +2 -2
- model-00006-of-00009.safetensors +2 -2
- model-00007-of-00009.safetensors +2 -2
- model-00008-of-00009.safetensors +2 -2
- model-00009-of-00009.safetensors +2 -2
- model.safetensors.index.json +0 -0
- special_tokens_map.json +1 -1
- tokenizer_config.json +5 -3
README.md
CHANGED
@@ -1,199 +1,200 @@
|
|
1 |
---
|
|
|
|
|
|
|
|
|
2 |
library_name: transformers
|
3 |
-
tags:
|
|
|
|
|
4 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
-
|
7 |
-
|
8 |
-
<!-- Provide a quick summary of what the model is/does. -->
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
## Model Details
|
13 |
-
|
14 |
-
### Model Description
|
15 |
-
|
16 |
-
<!-- Provide a longer summary of what this model is. -->
|
17 |
-
|
18 |
-
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
|
19 |
-
|
20 |
-
- **Developed by:** [More Information Needed]
|
21 |
-
- **Funded by [optional]:** [More Information Needed]
|
22 |
-
- **Shared by [optional]:** [More Information Needed]
|
23 |
-
- **Model type:** [More Information Needed]
|
24 |
-
- **Language(s) (NLP):** [More Information Needed]
|
25 |
-
- **License:** [More Information Needed]
|
26 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
27 |
-
|
28 |
-
### Model Sources [optional]
|
29 |
-
|
30 |
-
<!-- Provide the basic links for the model. -->
|
31 |
-
|
32 |
-
- **Repository:** [More Information Needed]
|
33 |
-
- **Paper [optional]:** [More Information Needed]
|
34 |
-
- **Demo [optional]:** [More Information Needed]
|
35 |
-
|
36 |
-
## Uses
|
37 |
-
|
38 |
-
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
39 |
-
|
40 |
-
### Direct Use
|
41 |
-
|
42 |
-
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
43 |
-
|
44 |
-
[More Information Needed]
|
45 |
-
|
46 |
-
### Downstream Use [optional]
|
47 |
-
|
48 |
-
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
49 |
-
|
50 |
-
[More Information Needed]
|
51 |
-
|
52 |
-
### Out-of-Scope Use
|
53 |
-
|
54 |
-
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
55 |
-
|
56 |
-
[More Information Needed]
|
57 |
-
|
58 |
-
## Bias, Risks, and Limitations
|
59 |
-
|
60 |
-
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
61 |
-
|
62 |
-
[More Information Needed]
|
63 |
-
|
64 |
-
### Recommendations
|
65 |
-
|
66 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
67 |
-
|
68 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
69 |
-
|
70 |
-
## How to Get Started with the Model
|
71 |
-
|
72 |
-
Use the code below to get started with the model.
|
73 |
-
|
74 |
-
[More Information Needed]
|
75 |
-
|
76 |
-
## Training Details
|
77 |
-
|
78 |
-
### Training Data
|
79 |
-
|
80 |
-
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
81 |
-
|
82 |
-
[More Information Needed]
|
83 |
-
|
84 |
-
### Training Procedure
|
85 |
-
|
86 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
87 |
-
|
88 |
-
#### Preprocessing [optional]
|
89 |
-
|
90 |
-
[More Information Needed]
|
91 |
-
|
92 |
-
|
93 |
-
#### Training Hyperparameters
|
94 |
-
|
95 |
-
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
96 |
-
|
97 |
-
#### Speeds, Sizes, Times [optional]
|
98 |
-
|
99 |
-
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
100 |
-
|
101 |
-
[More Information Needed]
|
102 |
-
|
103 |
-
## Evaluation
|
104 |
-
|
105 |
-
<!-- This section describes the evaluation protocols and provides the results. -->
|
106 |
-
|
107 |
-
### Testing Data, Factors & Metrics
|
108 |
-
|
109 |
-
#### Testing Data
|
110 |
-
|
111 |
-
<!-- This should link to a Dataset Card if possible. -->
|
112 |
-
|
113 |
-
[More Information Needed]
|
114 |
|
115 |
-
|
116 |
|
117 |
-
|
118 |
|
119 |
-
[
|
120 |
|
121 |
-
|
122 |
|
123 |
-
|
|
|
|
|
124 |
|
125 |
-
|
126 |
|
127 |
-
|
|
|
|
|
128 |
|
129 |
-
|
130 |
|
131 |
-
|
|
|
|
|
|
|
|
|
|
|
132 |
|
|
|
|
|
|
|
133 |
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
|
135 |
-
|
136 |
|
137 |
-
|
|
|
|
|
|
|
138 |
|
139 |
-
[
|
140 |
|
141 |
-
##
|
142 |
|
143 |
-
|
144 |
|
145 |
-
|
|
|
|
|
|
|
|
|
146 |
|
147 |
-
|
148 |
-
|
149 |
-
- **Cloud Provider:** [More Information Needed]
|
150 |
-
- **Compute Region:** [More Information Needed]
|
151 |
-
- **Carbon Emitted:** [More Information Needed]
|
152 |
|
153 |
-
|
154 |
|
155 |
-
|
156 |
|
157 |
-
[
|
158 |
|
159 |
-
|
160 |
|
161 |
-
[
|
162 |
|
163 |
-
|
|
|
|
|
|
|
|
|
164 |
|
165 |
-
[
|
166 |
|
167 |
-
####
|
168 |
|
169 |
-
[
|
170 |
|
171 |
-
|
|
|
|
|
|
|
172 |
|
173 |
-
|
174 |
|
175 |
-
|
176 |
|
177 |
-
|
178 |
|
179 |
-
|
180 |
|
181 |
-
|
|
|
|
|
|
|
|
|
|
|
182 |
|
183 |
-
|
184 |
|
185 |
-
|
186 |
|
187 |
-
|
|
|
|
|
188 |
|
189 |
-
|
190 |
|
191 |
-
|
192 |
|
193 |
-
|
|
|
|
|
|
|
194 |
|
195 |
-
|
196 |
|
197 |
-
|
198 |
|
199 |
-
[
|
|
|
1 |
---
|
2 |
+
base_model:
|
3 |
+
- openai/gpt-oss-20b
|
4 |
+
license: apache-2.0
|
5 |
+
pipeline_tag: text-generation
|
6 |
library_name: transformers
|
7 |
+
tags:
|
8 |
+
- openai
|
9 |
+
- unsloth
|
10 |
---
|
11 |
+
<div>
|
12 |
+
<p style="margin-bottom: 0; margin-top: 0;">
|
13 |
+
<strong>See <a href="https://huggingface.co/collections/unsloth/gpt-oss-6892433695ce0dee42f31681">our collection</a> for all versions of gpt-oss including GGUF, 4-bit & 16-bit formats.</strong>
|
14 |
+
</p>
|
15 |
+
<p style="margin-bottom: 0;">
|
16 |
+
<em>Learn to run gpt-oss correctly - <a href="https://docs.unsloth.ai/basics/gpt-oss">Read our Guide</a>.</em>
|
17 |
+
</p>
|
18 |
+
<p style="margin-top: 0;margin-bottom: 0;">
|
19 |
+
<em>See <a href="https://docs.unsloth.ai/basics/unsloth-dynamic-v2.0-gguf">Unsloth Dynamic 2.0 GGUFs</a> for our quantization benchmarks.</em>
|
20 |
+
</p>
|
21 |
+
<div style="display: flex; gap: 5px; align-items: center; ">
|
22 |
+
<a href="https://github.com/unslothai/unsloth/">
|
23 |
+
<img src="https://github.com/unslothai/unsloth/raw/main/images/unsloth%20new%20logo.png" width="133">
|
24 |
+
</a>
|
25 |
+
<a href="https://discord.gg/unsloth">
|
26 |
+
<img src="https://github.com/unslothai/unsloth/raw/main/images/Discord%20button.png" width="173">
|
27 |
+
</a>
|
28 |
+
<a href="https://docs.unsloth.ai/basics/gpt-oss">
|
29 |
+
<img src="https://raw.githubusercontent.com/unslothai/unsloth/refs/heads/main/images/documentation%20green%20button.png" width="143">
|
30 |
+
</a>
|
31 |
+
</div>
|
32 |
+
<h1 style="margin-top: 0rem;">✨ Read our gpt-oss Guide <a href="https://docs.unsloth.ai/basics/gpt-oss">here</a>!</h1>
|
33 |
+
</div>
|
34 |
+
|
35 |
+
- Read our Blog about gpt-oss support: [unsloth.ai/blog/gpt-oss](https://unsloth.ai/blog/gpt-oss)
|
36 |
+
- View the rest of our notebooks in our [docs here](https://docs.unsloth.ai/get-started/unsloth-notebooks).
|
37 |
+
- Thank you to the [llama.cpp](https://github.com/ggml-org/llama.cpp) team for their work on supporting this model. We wouldn't be able to release quants without them!
|
38 |
+
|
39 |
+
# gpt-oss-20b Details
|
40 |
+
|
41 |
+
<p align="center">
|
42 |
+
<img alt="gpt-oss-20b" src="https://raw.githubusercontent.com/openai/gpt-oss/main/docs/gpt-oss-20b.svg">
|
43 |
+
</p>
|
44 |
+
|
45 |
+
<p align="center">
|
46 |
+
<a href="https://gpt-oss.com"><strong>Try gpt-oss</strong></a> ·
|
47 |
+
<a href="https://cookbook.openai.com/topic/gpt-oss"><strong>Guides</strong></a> ·
|
48 |
+
<a href="https://openai.com/index/gpt-oss-model-card"><strong>System card</strong></a> ·
|
49 |
+
<a href="https://openai.com/index/introducing-gpt-oss/"><strong>OpenAI blog</strong></a>
|
50 |
+
</p>
|
51 |
+
|
52 |
+
<br>
|
53 |
+
|
54 |
+
Welcome to the gpt-oss series, [OpenAI’s open-weight models](https://openai.com/open-models) designed for powerful reasoning, agentic tasks, and versatile developer use cases.
|
55 |
+
|
56 |
+
We’re releasing two flavors of the open models:
|
57 |
+
- `gpt-oss-120b` — for production, general purpose, high reasoning use cases that fits into a single H100 GPU (117B parameters with 5.1B active parameters)
|
58 |
+
- `gpt-oss-20b` — for lower latency, and local or specialized use cases (21B parameters with 3.6B active parameters)
|
59 |
+
|
60 |
+
Both models were trained on our [harmony response format](https://github.com/openai/harmony) and should only be used with the harmony format as it will not work correctly otherwise.
|
61 |
+
|
62 |
+
|
63 |
+
> [!NOTE]
|
64 |
+
> This model card is dedicated to the smaller `gpt-oss-20b` model. Check out [`gpt-oss-120b`](https://huggingface.co/openai/gpt-oss-120b) for the larger model.
|
65 |
+
|
66 |
+
# Highlights
|
67 |
+
|
68 |
+
* **Permissive Apache 2.0 license:** Build freely without copyleft restrictions or patent risk—ideal for experimentation, customization, and commercial deployment.
|
69 |
+
* **Configurable reasoning effort:** Easily adjust the reasoning effort (low, medium, high) based on your specific use case and latency needs.
|
70 |
+
* **Full chain-of-thought:** Gain complete access to the model’s reasoning process, facilitating easier debugging and increased trust in outputs. It’s not intended to be shown to end users.
|
71 |
+
* **Fine-tunable:** Fully customize models to your specific use case through parameter fine-tuning.
|
72 |
+
* **Agentic capabilities:** Use the models’ native capabilities for function calling, [web browsing](https://github.com/openai/gpt-oss/tree/main?tab=readme-ov-file#browser), [Python code execution](https://github.com/openai/gpt-oss/tree/main?tab=readme-ov-file#python), and Structured Outputs.
|
73 |
+
* **Native MXFP4 quantization:** The models are trained with native MXFP4 precision for the MoE layer, making `gpt-oss-120b` run on a single H100 GPU and the `gpt-oss-20b` model run within 16GB of memory.
|
74 |
|
75 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
|
77 |
+
# Inference examples
|
78 |
|
79 |
+
## Transformers
|
80 |
|
81 |
+
You can use `gpt-oss-120b` and `gpt-oss-20b` with Transformers. If you use the Transformers chat template, it will automatically apply the [harmony response format](https://github.com/openai/harmony). If you use `model.generate` directly, you need to apply the harmony format manually using the chat template or use our [openai-harmony](https://github.com/openai/harmony) package.
|
82 |
|
83 |
+
To get started, install the necessary dependencies to setup your environment:
|
84 |
|
85 |
+
```
|
86 |
+
pip install -U transformers kernels torch
|
87 |
+
```
|
88 |
|
89 |
+
Once, setup you can proceed to run the model by running the snippet below:
|
90 |
|
91 |
+
```py
|
92 |
+
from transformers import pipeline
|
93 |
+
import torch
|
94 |
|
95 |
+
model_id = "openai/gpt-oss-20b"
|
96 |
|
97 |
+
pipe = pipeline(
|
98 |
+
"text-generation",
|
99 |
+
model=model_id,
|
100 |
+
torch_dtype="auto",
|
101 |
+
device_map="auto",
|
102 |
+
)
|
103 |
|
104 |
+
messages = [
|
105 |
+
{"role": "user", "content": "Explain quantum mechanics clearly and concisely."},
|
106 |
+
]
|
107 |
|
108 |
+
outputs = pipe(
|
109 |
+
messages,
|
110 |
+
max_new_tokens=256,
|
111 |
+
)
|
112 |
+
print(outputs[0]["generated_text"][-1])
|
113 |
+
```
|
114 |
|
115 |
+
Alternatively, you can run the model via [`Transformers Serve`](https://huggingface.co/docs/transformers/main/serving) to spin up a OpenAI-compatible webserver:
|
116 |
|
117 |
+
```
|
118 |
+
transformers serve
|
119 |
+
transformers chat localhost:8000 --model-name-or-path openai/gpt-oss-20b
|
120 |
+
```
|
121 |
|
122 |
+
[Learn more about how to use gpt-oss with Transformers.](https://cookbook.openai.com/articles/gpt-oss/run-transformers)
|
123 |
|
124 |
+
## vLLM
|
125 |
|
126 |
+
vLLM recommends using [uv](https://docs.astral.sh/uv/) for Python dependency management. You can use vLLM to spin up an OpenAI-compatible webserver. The following command will automatically download the model and start the server.
|
127 |
|
128 |
+
```bash
|
129 |
+
uv pip install --pre vllm==0.10.1+gptoss \
|
130 |
+
--extra-index-url https://wheels.vllm.ai/gpt-oss/ \
|
131 |
+
--extra-index-url https://download.pytorch.org/whl/nightly/cu128 \
|
132 |
+
--index-strategy unsafe-best-match
|
133 |
|
134 |
+
vllm serve openai/gpt-oss-20b
|
135 |
+
```
|
|
|
|
|
|
|
136 |
|
137 |
+
[Learn more about how to use gpt-oss with vLLM.](https://cookbook.openai.com/articles/gpt-oss/run-vllm)
|
138 |
|
139 |
+
## PyTorch / Triton
|
140 |
|
141 |
+
To learn about how to use this model with PyTorch and Triton, check out our [reference implementations in the gpt-oss repository](https://github.com/openai/gpt-oss?tab=readme-ov-file#reference-pytorch-implementation).
|
142 |
|
143 |
+
## Ollama
|
144 |
|
145 |
+
If you are trying to run gpt-oss on consumer hardware, you can use Ollama by running the following commands after [installing Ollama](https://ollama.com/download).
|
146 |
|
147 |
+
```bash
|
148 |
+
# gpt-oss-20b
|
149 |
+
ollama pull gpt-oss:20b
|
150 |
+
ollama run gpt-oss:20b
|
151 |
+
```
|
152 |
|
153 |
+
[Learn more about how to use gpt-oss with Ollama.](https://cookbook.openai.com/articles/gpt-oss/run-locally-ollama)
|
154 |
|
155 |
+
#### LM Studio
|
156 |
|
157 |
+
If you are using [LM Studio](https://lmstudio.ai/) you can use the following commands to download.
|
158 |
|
159 |
+
```bash
|
160 |
+
# gpt-oss-20b
|
161 |
+
lms get openai/gpt-oss-20b
|
162 |
+
```
|
163 |
|
164 |
+
Check out our [awesome list](https://github.com/openai/gpt-oss/blob/main/awesome-gpt-oss.md) for a broader collection of gpt-oss resources and inference partners.
|
165 |
|
166 |
+
---
|
167 |
|
168 |
+
# Download the model
|
169 |
|
170 |
+
You can download the model weights from the [Hugging Face Hub](https://huggingface.co/collections/openai/gpt-oss-68911959590a1634ba11c7a4) directly from Hugging Face CLI:
|
171 |
|
172 |
+
```shell
|
173 |
+
# gpt-oss-20b
|
174 |
+
huggingface-cli download openai/gpt-oss-20b --include "original/*" --local-dir gpt-oss-20b/
|
175 |
+
pip install gpt-oss
|
176 |
+
python -m gpt_oss.chat model/
|
177 |
+
```
|
178 |
|
179 |
+
# Reasoning levels
|
180 |
|
181 |
+
You can adjust the reasoning level that suits your task across three levels:
|
182 |
|
183 |
+
* **Low:** Fast responses for general dialogue.
|
184 |
+
* **Medium:** Balanced speed and detail.
|
185 |
+
* **High:** Deep and detailed analysis.
|
186 |
|
187 |
+
The reasoning level can be set in the system prompts, e.g., "Reasoning: high".
|
188 |
|
189 |
+
# Tool use
|
190 |
|
191 |
+
The gpt-oss models are excellent for:
|
192 |
+
* Web browsing (using built-in browsing tools)
|
193 |
+
* Function calling with defined schemas
|
194 |
+
* Agentic operations like browser tasks
|
195 |
|
196 |
+
# Fine-tuning
|
197 |
|
198 |
+
Both gpt-oss models can be fine-tuned for a variety of specialized use cases.
|
199 |
|
200 |
+
This smaller model `gpt-oss-20b` can be fine-tuned on consumer hardware, whereas the larger [`gpt-oss-120b`](https://huggingface.co/openai/gpt-oss-120b) can be fine-tuned on a single H100 node.
|
chat_template.jinja
CHANGED
@@ -84,8 +84,7 @@
|
|
84 |
|
85 |
{%- elif param_spec.type == "object" -%}
|
86 |
{%- if param_spec.properties -%}
|
87 |
-
{{- "{
|
88 |
-
" }}
|
89 |
{%- for prop_name, prop_spec in param_spec.properties.items() -%}
|
90 |
{{- prop_name -}}
|
91 |
{%- if prop_name not in (param_spec.required or []) -%}
|
@@ -107,25 +106,17 @@
|
|
107 |
{%- endmacro -%}
|
108 |
|
109 |
{%- macro render_tool_namespace(namespace_name, tools) -%}
|
110 |
-
{{- "## " + namespace_name + "
|
111 |
-
|
112 |
-
" }}
|
113 |
-
{{- "namespace " + namespace_name + " {
|
114 |
-
|
115 |
-
" }}
|
116 |
{%- for tool in tools %}
|
117 |
{%- set tool = tool.function %}
|
118 |
-
{{- "// " + tool.description + "
|
119 |
-
" }}
|
120 |
-
{
|
121 |
-
|
122 |
-
{{- "
|
123 |
-
" }}
|
124 |
{%- for param_name, param_spec in tool.parameters.properties.items() %}
|
125 |
-
{
|
126 |
-
{{- "// " + param_spec.description + "
|
127 |
-
" }}
|
128 |
-
{%- endif %}
|
129 |
{{- param_name }}
|
130 |
{%- if param_name not in (tool.parameters.required or []) -%}
|
131 |
{{- "?" }}
|
@@ -133,147 +124,84 @@
|
|
133 |
{{- ": " }}
|
134 |
{{- render_typescript_type(param_spec, tool.parameters.required or []) }}
|
135 |
{%- if param_spec.default is defined -%}
|
136 |
-
{%- if param_spec.
|
137 |
-
{{- ", // default: " + param_spec.default }}
|
138 |
-
{%- elif param_spec.oneOf %}
|
139 |
{{- "// default: " + param_spec.default }}
|
140 |
{%- else %}
|
141 |
{{- ", // default: " + param_spec.default|tojson }}
|
142 |
{%- endif -%}
|
143 |
{%- endif -%}
|
144 |
{%- if not loop.last %}
|
145 |
-
{{- "
|
146 |
-
" }}
|
147 |
-
{%- else %}
|
148 |
-
{{- "
|
149 |
-
" }}
|
150 |
{%- endif -%}
|
151 |
{%- endfor %}
|
152 |
-
{{- "}) => any
|
153 |
-
|
154 |
-
" }}
|
155 |
{%- else -%}
|
156 |
-
{{- "
|
157 |
-
|
158 |
-
" }}
|
159 |
{%- endif -%}
|
160 |
{%- endfor %}
|
161 |
-
{{- "} // namespace " + namespace_name }}
|
162 |
{%- endmacro -%}
|
163 |
|
164 |
{%- macro render_builtin_tools(browser_tool, python_tool) -%}
|
165 |
{%- if browser_tool %}
|
166 |
-
{{- "## browser
|
167 |
-
|
168 |
-
" }}
|
169 |
-
{{- "//
|
170 |
-
" }}
|
171 |
-
{{- "//
|
172 |
-
" }}
|
173 |
-
{{- "
|
174 |
-
" }}
|
175 |
-
{{- "
|
176 |
-
" }}
|
177 |
-
{{- "
|
178 |
-
" }}
|
179 |
-
{{- "
|
180 |
-
" }}
|
181 |
-
{{- "
|
182 |
-
|
183 |
-
" }}
|
184 |
-
{{- "//
|
185 |
-
" }}
|
186 |
-
{{- "type
|
187 |
-
" }}
|
188 |
-
{{- "
|
189 |
-
" }}
|
190 |
-
{{- "
|
191 |
-
" }}
|
192 |
-
{{- "source?: string
|
193 |
-
" }}
|
194 |
-
{{- "
|
195 |
-
|
196 |
-
" }}
|
197 |
-
{{- "
|
198 |
-
" }}
|
199 |
-
{{- "//
|
200 |
-
" }}
|
201 |
-
{{- "// If `cursor` is not provided, the most recent page is implied.
|
202 |
-
" }}
|
203 |
-
{{- "// If `id` is a string, it is treated as a fully qualified URL associated with `source`.
|
204 |
-
" }}
|
205 |
-
{{- "// If `loc` is not provided, the viewport will be positioned at the beginning of the document or centered on the most relevant passage, if available.
|
206 |
-
" }}
|
207 |
-
{{- "// Use this function without `id` to scroll to a new location of an opened page.
|
208 |
-
" }}
|
209 |
-
{{- "type open = (_: {
|
210 |
-
" }}
|
211 |
-
{{- "id?: number | string, // default: -1
|
212 |
-
" }}
|
213 |
-
{{- "cursor?: number, // default: -1
|
214 |
-
" }}
|
215 |
-
{{- "loc?: number, // default: -1
|
216 |
-
" }}
|
217 |
-
{{- "num_lines?: number, // default: -1
|
218 |
-
" }}
|
219 |
-
{{- "view_source?: boolean, // default: false
|
220 |
-
" }}
|
221 |
-
{{- "source?: string,
|
222 |
-
" }}
|
223 |
-
{{- "}) => any;
|
224 |
-
|
225 |
-
" }}
|
226 |
-
{{- "// Finds exact matches of `pattern` in the current page, or the page given by `cursor`.
|
227 |
-
" }}
|
228 |
-
{{- "type find = (_: {
|
229 |
-
" }}
|
230 |
-
{{- "pattern: string,
|
231 |
-
" }}
|
232 |
-
{{- "cursor?: number, // default: -1
|
233 |
-
" }}
|
234 |
-
{{- "}) => any;
|
235 |
-
|
236 |
-
" }}
|
237 |
-
{{- "} // namespace browser
|
238 |
-
|
239 |
-
" }}
|
240 |
{%- endif -%}
|
241 |
|
242 |
{%- if python_tool %}
|
243 |
-
{{- "## python
|
244 |
-
|
245 |
-
" }}
|
246 |
-
{{- "Use this tool to execute Python code in your chain of thought. The code will not be shown to the user. This tool should be used for internal reasoning, but not for code that is intended to be visible to the user (e.g. when creating plots, tables, or files).
|
247 |
-
|
248 |
-
" }}
|
249 |
-
{{- "When you send a message containing Python code to python, it will be executed in a stateful Jupyter notebook environment. python will respond with the output of the execution or time out after 120.0 seconds. The drive at '/mnt/data' can be used to save and persist user files. Internet access for this session is UNKNOWN. Depends on the cluster.
|
250 |
-
|
251 |
-
" }}
|
252 |
{%- endif -%}
|
253 |
{%- endmacro -%}
|
254 |
|
255 |
{#- System Message Construction ============================================ #}
|
256 |
{%- macro build_system_message() -%}
|
257 |
{%- if model_identity is not defined %}
|
258 |
-
{
|
|
|
|
|
259 |
{%- endif %}
|
260 |
-
{{-
|
261 |
-
" }}
|
262 |
-
{{- "Knowledge cutoff: 2024-06
|
263 |
-
" }}
|
264 |
-
{{- "Current date: " + strftime_now("%Y-%m-%d") + "
|
265 |
-
|
266 |
-
" }}
|
267 |
{%- if reasoning_effort is not defined %}
|
268 |
{%- set reasoning_effort = "medium" %}
|
269 |
{%- endif %}
|
270 |
-
{{- "Reasoning: " + reasoning_effort + "
|
271 |
-
|
272 |
-
" }}
|
273 |
-
{%- if builtin_tools %}
|
274 |
-
{{- "# Tools
|
275 |
-
|
276 |
-
" }}
|
277 |
{%- set available_builtin_tools = namespace(browser=false, python=false) %}
|
278 |
{%- for tool in builtin_tools %}
|
279 |
{%- if tool == "browser" %}
|
@@ -284,11 +212,8 @@
|
|
284 |
{%- endfor %}
|
285 |
{{- render_builtin_tools(available_builtin_tools.browser, available_builtin_tools.python) }}
|
286 |
{%- endif -%}
|
287 |
-
{{- "# Valid channels: analysis, commentary, final. Channel must be included for every message
|
288 |
-
{
|
289 |
-
{{- "
|
290 |
-
Calls to these tools must go to the commentary channel: 'functions'." }}
|
291 |
-
{%- endif -%}
|
292 |
{%- endmacro -%}
|
293 |
|
294 |
{#- Main Template Logic ================================================= #}
|
@@ -312,18 +237,12 @@ Calls to these tools must go to the commentary channel: 'functions'." }}
|
|
312 |
{%- if developer_message or tools %}
|
313 |
{{- "<|start|>developer<|message|>" }}
|
314 |
{%- if developer_message %}
|
315 |
-
{{- "# Instructions
|
316 |
-
|
317 |
-
" }}
|
318 |
{{- developer_message }}
|
319 |
{%- endif %}
|
320 |
{%- if tools -%}
|
321 |
-
{{- "
|
322 |
-
|
323 |
-
" }}
|
324 |
-
{{- "# Tools
|
325 |
-
|
326 |
-
" }}
|
327 |
{{- render_tool_namespace("functions", tools) }}
|
328 |
{%- endif -%}
|
329 |
{{- "<|end|>" }}
|
@@ -334,17 +253,6 @@ Calls to these tools must go to the commentary channel: 'functions'." }}
|
|
334 |
{%- for message in loop_messages -%}
|
335 |
{#- At this point only assistant/user/tool messages should remain #}
|
336 |
{%- if message.role == 'assistant' -%}
|
337 |
-
{#- Checks to ensure the messages are being passed in the format we expect #}
|
338 |
-
{%- if "content" in message %}
|
339 |
-
{%- if "<|channel|>analysis<|message|>" in message.content or "<|channel|>final<|message|>" in message.content %}
|
340 |
-
{{- raise_exception("You have passed a message containing <|channel|> tags in the content field. Instead of doing this, you should pass analysis messages (the string between '<|message|>' and '<|end|>') in the 'thinking' field, and final messages (the string between '<|message|>' and '<|end|>') in the 'content' field.") }}
|
341 |
-
{%- endif %}
|
342 |
-
{%- endif %}
|
343 |
-
{%- if "thinking" in message %}
|
344 |
-
{%- if "<|channel|>analysis<|message|>" in message.thinking or "<|channel|>final<|message|>" in message.thinking %}
|
345 |
-
{{- raise_exception("You have passed a message containing <|channel|> tags in the thinking field. Instead of doing this, you should pass analysis messages (the string between '<|message|>' and '<|end|>') in the 'thinking' field, and final messages (the string between '<|message|>' and '<|end|>') in the 'content' field.") }}
|
346 |
-
{%- endif %}
|
347 |
-
{%- endif %}
|
348 |
{%- if "tool_calls" in message %}
|
349 |
{#- We assume max 1 tool call per message, and so we infer the tool call name #}
|
350 |
{#- in "tool" messages from the most recent assistant tool call name #}
|
@@ -352,33 +260,35 @@ Calls to these tools must go to the commentary channel: 'functions'." }}
|
|
352 |
{%- if tool_call.function %}
|
353 |
{%- set tool_call = tool_call.function %}
|
354 |
{%- endif %}
|
355 |
-
{%- if message.content
|
356 |
-
{{- raise_exception("Cannot pass both content and thinking in an assistant message with tool calls! Put the analysis message in one or the other, but not both.") }}
|
357 |
-
{%- elif message.content %}
|
358 |
{{- "<|start|>assistant<|channel|>analysis<|message|>" + message.content + "<|end|>" }}
|
359 |
-
{%- elif message.thinking %}
|
360 |
-
{{- "<|start|>assistant<|channel|>analysis<|message|>" + message.thinking + "<|end|>" }}
|
361 |
{%- endif %}
|
362 |
{{- "<|start|>assistant to=" }}
|
363 |
-
{{- "functions." + tool_call.name + "<|channel|>commentary " }}
|
364 |
-
{{- (tool_call.content_type if tool_call.content_type is defined else "json") + "<|message|>" }}
|
365 |
{{- tool_call.arguments|tojson }}
|
366 |
-
{{- "<|
|
367 |
{%- set last_tool_call.name = tool_call.name %}
|
368 |
-
{%- elif loop.last and not add_generation_prompt %}
|
369 |
{#- Only render the CoT if the final turn is an assistant turn and add_generation_prompt is false #}
|
370 |
{#- This is a situation that should only occur in training, never in inference. #}
|
371 |
-
{
|
372 |
-
{{- "<|start|>assistant<|channel|>analysis<|message|>" + message.thinking + "<|end|>" }}
|
373 |
-
{%- endif %}
|
374 |
{#- <|return|> indicates the end of generation, but <|end|> does not #}
|
375 |
{#- <|return|> should never be an input to the model, but we include it as the final token #}
|
376 |
{#- when training, so the model learns to emit it. #}
|
377 |
{{- "<|start|>assistant<|channel|>final<|message|>" + message.content + "<|return|>" }}
|
378 |
-
|
|
|
379 |
{#- CoT is dropped during all previous turns, so we never render it for inference #}
|
380 |
{{- "<|start|>assistant<|channel|>final<|message|>" + message.content + "<|end|>" }}
|
381 |
{%- set last_tool_call.name = none %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
382 |
{%- endif %}
|
383 |
{%- elif message.role == 'tool' -%}
|
384 |
{%- if last_tool_call.name is none %}
|
@@ -386,7 +296,7 @@ Calls to these tools must go to the commentary channel: 'functions'." }}
|
|
386 |
{%- endif %}
|
387 |
{{- "<|start|>functions." + last_tool_call.name }}
|
388 |
{{- " to=assistant<|channel|>commentary<|message|>" + message.content|tojson + "<|end|>" }}
|
389 |
-
{%-
|
390 |
{{- "<|start|>user<|message|>" + message.content + "<|end|>" }}
|
391 |
{%- endif -%}
|
392 |
{%- endfor -%}
|
@@ -394,4 +304,4 @@ Calls to these tools must go to the commentary channel: 'functions'." }}
|
|
394 |
{#- Generation prompt #}
|
395 |
{%- if add_generation_prompt -%}
|
396 |
<|start|>assistant
|
397 |
-
{%- endif -%}
|
|
|
84 |
|
85 |
{%- elif param_spec.type == "object" -%}
|
86 |
{%- if param_spec.properties -%}
|
87 |
+
{{- "{\n" }}
|
|
|
88 |
{%- for prop_name, prop_spec in param_spec.properties.items() -%}
|
89 |
{{- prop_name -}}
|
90 |
{%- if prop_name not in (param_spec.required or []) -%}
|
|
|
106 |
{%- endmacro -%}
|
107 |
|
108 |
{%- macro render_tool_namespace(namespace_name, tools) -%}
|
109 |
+
{{- "## " + namespace_name + "\n\n" }}
|
110 |
+
{{- "namespace " + namespace_name + " {\n\n" }}
|
|
|
|
|
|
|
|
|
111 |
{%- for tool in tools %}
|
112 |
{%- set tool = tool.function %}
|
113 |
+
{{- "// " + tool.description + "\n" }}
|
114 |
+
{{- "type "+ tool.name + " = (" }}
|
115 |
+
{%- if tool.parameters and tool.parameters.properties -%}
|
116 |
+
{{- "_: " }}
|
117 |
+
{{- "{\n" }}
|
|
|
118 |
{%- for param_name, param_spec in tool.parameters.properties.items() %}
|
119 |
+
{{- "// " + param_spec.description + "\n" }}
|
|
|
|
|
|
|
120 |
{{- param_name }}
|
121 |
{%- if param_name not in (tool.parameters.required or []) -%}
|
122 |
{{- "?" }}
|
|
|
124 |
{{- ": " }}
|
125 |
{{- render_typescript_type(param_spec, tool.parameters.required or []) }}
|
126 |
{%- if param_spec.default is defined -%}
|
127 |
+
{%- if param_spec.oneOf %}
|
|
|
|
|
128 |
{{- "// default: " + param_spec.default }}
|
129 |
{%- else %}
|
130 |
{{- ", // default: " + param_spec.default|tojson }}
|
131 |
{%- endif -%}
|
132 |
{%- endif -%}
|
133 |
{%- if not loop.last %}
|
134 |
+
{{- ",\n" }}
|
|
|
|
|
|
|
|
|
135 |
{%- endif -%}
|
136 |
{%- endfor %}
|
137 |
+
{{- ",\n}) => any;\n" }}
|
|
|
|
|
138 |
{%- else -%}
|
139 |
+
{{- "\n}) => any;\n" }}
|
|
|
|
|
140 |
{%- endif -%}
|
141 |
{%- endfor %}
|
142 |
+
{{- "\n} // namespace " + namespace_name }}
|
143 |
{%- endmacro -%}
|
144 |
|
145 |
{%- macro render_builtin_tools(browser_tool, python_tool) -%}
|
146 |
{%- if browser_tool %}
|
147 |
+
{{- "## browser\n\n" }}
|
148 |
+
{{- "// Tool for browsing.\n" }}
|
149 |
+
{{- "// The `cursor` appears in brackets before each browsing display: `[{cursor}]`.\n" }}
|
150 |
+
{{- "// Cite information from the tool using the following format:\n" }}
|
151 |
+
{{- "// `【{cursor}†L{line_start}(-L{line_end})?】`, for example: `【6†L9-L11】` or `【8†L3】`.\n" }}
|
152 |
+
{{- "// Do not quote more than 10 words directly from the tool output.\n" }}
|
153 |
+
{{- "// sources=web (default: web)\n" }}
|
154 |
+
{{- "namespace browser {\n\n" }}
|
155 |
+
{{- "// Searches for information related to `query` and displays `topn` results.\n" }}
|
156 |
+
{{- "type search = (_: {\n" }}
|
157 |
+
{{- "query: string,\n" }}
|
158 |
+
{{- "topn?: number, // default: 10\n" }}
|
159 |
+
{{- "source?: string,\n" }}
|
160 |
+
{{- "}) => any;\n\n" }}
|
161 |
+
{{- "// Opens the link `id` from the page indicated by `cursor` starting at line number `loc`, showing `num_lines` lines.\n" }}
|
162 |
+
{{- "// Valid link ids are displayed with the formatting: `【{id}†.*】`.\n" }}
|
163 |
+
{{- "// If `cursor` is not provided, the most recent page is implied.\n" }}
|
164 |
+
{{- "// If `id` is a string, it is treated as a fully qualified URL associated with `source`.\n" }}
|
165 |
+
{{- "// If `loc` is not provided, the viewport will be positioned at the beginning of the document or centered on the most relevant passage, if available.\n" }}
|
166 |
+
{{- "// Use this function without `id` to scroll to a new location of an opened page.\n" }}
|
167 |
+
{{- "type open = (_: {\n" }}
|
168 |
+
{{- "id?: number | string, // default: -1\n" }}
|
169 |
+
{{- "cursor?: number, // default: -1\n" }}
|
170 |
+
{{- "loc?: number, // default: -1\n" }}
|
171 |
+
{{- "num_lines?: number, // default: -1\n" }}
|
172 |
+
{{- "view_source?: boolean, // default: false\n" }}
|
173 |
+
{{- "source?: string,\n" }}
|
174 |
+
{{- "}) => any;\n\n" }}
|
175 |
+
{{- "// Finds exact matches of `pattern` in the current page, or the page given by `cursor`.\n" }}
|
176 |
+
{{- "type find = (_: {\n" }}
|
177 |
+
{{- "pattern: string,\n" }}
|
178 |
+
{{- "cursor?: number, // default: -1\n" }}
|
179 |
+
{{- "}) => any;\n\n" }}
|
180 |
+
{{- "} // namespace browser\n\n" }}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
{%- endif -%}
|
182 |
|
183 |
{%- if python_tool %}
|
184 |
+
{{- "## python\n\n" }}
|
185 |
+
{{- "Use this tool to execute Python code in your chain of thought. The code will not be shown to the user. This tool should be used for internal reasoning, but not for code that is intended to be visible to the user (e.g. when creating plots, tables, or files).\n\n" }}
|
186 |
+
{{- "When you send a message containing Python code to python, it will be executed in a stateful Jupyter notebook environment. python will respond with the output of the execution or time out after 120.0 seconds. The drive at '/mnt/data' can be used to save and persist user files. Internet access for this session is UNKNOWN. Depends on the cluster.\n\n" }}
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
{%- endif -%}
|
188 |
{%- endmacro -%}
|
189 |
|
190 |
{#- System Message Construction ============================================ #}
|
191 |
{%- macro build_system_message() -%}
|
192 |
{%- if model_identity is not defined %}
|
193 |
+
{{- "You are ChatGPT, a large language model trained by OpenAI.\n" -}}
|
194 |
+
{%- else %}
|
195 |
+
{{- model_identity }}
|
196 |
{%- endif %}
|
197 |
+
{{- "Knowledge cutoff: 2024-06\n" }}
|
198 |
+
{{- "Current date: " + strftime_now("%Y-%m-%d") + "\n\n" }}
|
|
|
|
|
|
|
|
|
|
|
199 |
{%- if reasoning_effort is not defined %}
|
200 |
{%- set reasoning_effort = "medium" %}
|
201 |
{%- endif %}
|
202 |
+
{{- "Reasoning: " + reasoning_effort + "\n\n" }}
|
203 |
+
{%- if builtin_tools is defined %}
|
204 |
+
{{- "# Tools\n\n" }}
|
|
|
|
|
|
|
|
|
205 |
{%- set available_builtin_tools = namespace(browser=false, python=false) %}
|
206 |
{%- for tool in builtin_tools %}
|
207 |
{%- if tool == "browser" %}
|
|
|
212 |
{%- endfor %}
|
213 |
{{- render_builtin_tools(available_builtin_tools.browser, available_builtin_tools.python) }}
|
214 |
{%- endif -%}
|
215 |
+
{{- "# Valid channels: analysis, commentary, final. Channel must be included for every message.\n" }}
|
216 |
+
{{- "Calls to these tools must go to the commentary channel: 'functions'." }}
|
|
|
|
|
|
|
217 |
{%- endmacro -%}
|
218 |
|
219 |
{#- Main Template Logic ================================================= #}
|
|
|
237 |
{%- if developer_message or tools %}
|
238 |
{{- "<|start|>developer<|message|>" }}
|
239 |
{%- if developer_message %}
|
240 |
+
{{- "# Instructions\n\n" }}
|
|
|
|
|
241 |
{{- developer_message }}
|
242 |
{%- endif %}
|
243 |
{%- if tools -%}
|
244 |
+
{{- "\n\n" }}
|
245 |
+
{{- "# Tools\n\n" }}
|
|
|
|
|
|
|
|
|
246 |
{{- render_tool_namespace("functions", tools) }}
|
247 |
{%- endif -%}
|
248 |
{{- "<|end|>" }}
|
|
|
253 |
{%- for message in loop_messages -%}
|
254 |
{#- At this point only assistant/user/tool messages should remain #}
|
255 |
{%- if message.role == 'assistant' -%}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
256 |
{%- if "tool_calls" in message %}
|
257 |
{#- We assume max 1 tool call per message, and so we infer the tool call name #}
|
258 |
{#- in "tool" messages from the most recent assistant tool call name #}
|
|
|
260 |
{%- if tool_call.function %}
|
261 |
{%- set tool_call = tool_call.function %}
|
262 |
{%- endif %}
|
263 |
+
{%- if message.content %}
|
|
|
|
|
264 |
{{- "<|start|>assistant<|channel|>analysis<|message|>" + message.content + "<|end|>" }}
|
|
|
|
|
265 |
{%- endif %}
|
266 |
{{- "<|start|>assistant to=" }}
|
267 |
+
{{- "functions." + tool_call.name + "<|channel|>commentary json<|message|>" }}
|
|
|
268 |
{{- tool_call.arguments|tojson }}
|
269 |
+
{{- "<|end|>" }}
|
270 |
{%- set last_tool_call.name = tool_call.name %}
|
271 |
+
{%- elif "thinking" in message and loop.last and not add_generation_prompt %}
|
272 |
{#- Only render the CoT if the final turn is an assistant turn and add_generation_prompt is false #}
|
273 |
{#- This is a situation that should only occur in training, never in inference. #}
|
274 |
+
{{- "<|start|>assistant<|channel|>analysis<|message|>" + message.thinking + "<|end|>" }}
|
|
|
|
|
275 |
{#- <|return|> indicates the end of generation, but <|end|> does not #}
|
276 |
{#- <|return|> should never be an input to the model, but we include it as the final token #}
|
277 |
{#- when training, so the model learns to emit it. #}
|
278 |
{{- "<|start|>assistant<|channel|>final<|message|>" + message.content + "<|return|>" }}
|
279 |
+
{%- set last_tool_call.name = none %}
|
280 |
+
{%- elif "thinking" in message %}
|
281 |
{#- CoT is dropped during all previous turns, so we never render it for inference #}
|
282 |
{{- "<|start|>assistant<|channel|>final<|message|>" + message.content + "<|end|>" }}
|
283 |
{%- set last_tool_call.name = none %}
|
284 |
+
{%- elif loop.last and not add_generation_prompt %}
|
285 |
+
{#- <|return|> indicates the end of generation, but <|end|> does not #}
|
286 |
+
{#- <|return|> should never be an input to the model, but we include it as the final token #}
|
287 |
+
{#- when training, so the model learns to emit it. #}
|
288 |
+
{{- "<|start|>assistant<|message|>" + message.content + "<|return|>" }}
|
289 |
+
{%- else %}
|
290 |
+
{{- "<|start|>assistant<|message|>" + message.content + "<|end|>" }}
|
291 |
+
{%- set last_tool_call.name = none %}
|
292 |
{%- endif %}
|
293 |
{%- elif message.role == 'tool' -%}
|
294 |
{%- if last_tool_call.name is none %}
|
|
|
296 |
{%- endif %}
|
297 |
{{- "<|start|>functions." + last_tool_call.name }}
|
298 |
{{- " to=assistant<|channel|>commentary<|message|>" + message.content|tojson + "<|end|>" }}
|
299 |
+
{%- else -%}
|
300 |
{{- "<|start|>user<|message|>" + message.content + "<|end|>" }}
|
301 |
{%- endif -%}
|
302 |
{%- endfor -%}
|
|
|
304 |
{#- Generation prompt #}
|
305 |
{%- if add_generation_prompt -%}
|
306 |
<|start|>assistant
|
307 |
+
{%- endif -%}
|
config.json
CHANGED
@@ -50,10 +50,10 @@
|
|
50 |
"quantization_config": {
|
51 |
"_load_in_4bit": true,
|
52 |
"_load_in_8bit": false,
|
53 |
-
"bnb_4bit_compute_dtype": "
|
54 |
"bnb_4bit_quant_storage": "uint8",
|
55 |
-
"bnb_4bit_quant_type": "
|
56 |
-
"bnb_4bit_use_double_quant":
|
57 |
"llm_int8_enable_fp32_cpu_offload": false,
|
58 |
"llm_int8_has_fp16_weight": false,
|
59 |
"llm_int8_skip_modules": null,
|
|
|
50 |
"quantization_config": {
|
51 |
"_load_in_4bit": true,
|
52 |
"_load_in_8bit": false,
|
53 |
+
"bnb_4bit_compute_dtype": "bfloat16",
|
54 |
"bnb_4bit_quant_storage": "uint8",
|
55 |
+
"bnb_4bit_quant_type": "nf4",
|
56 |
+
"bnb_4bit_use_double_quant": true,
|
57 |
"llm_int8_enable_fp32_cpu_offload": false,
|
58 |
"llm_int8_has_fp16_weight": false,
|
59 |
"llm_int8_skip_modules": null,
|
model-00001-of-00003.safetensors
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:6144f0b8c6c68fbe771ce0bee1a45484ddcfa0cf8eefd1c2535462b8f3df7af6
|
3 |
-
size 4993602118
|
|
|
|
|
|
|
|
model-00001-of-00009.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a4a3c327aefba36ec6e7e22410120535a8ff66e839ac4f6a66a6bb79d3b422a9
|
3 |
+
size 4386174152
|
model-00002-of-00003.safetensors
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:a9ed0071303019e5eebfd4734019ac63492a1340f90e6df45e35451a85be5ee9
|
3 |
-
size 4996013148
|
|
|
|
|
|
|
|
model-00002-of-00009.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:16bb10d8bdb8e7b52b6745db906fbbc3dca863ef4944da0ae15f414417e7845a
|
3 |
+
size 4821008665
|
model-00003-of-00003.safetensors
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:5215bfd3dc6194ca0849064560167581cfda2fcbb4fbb72c01bcd20dace90b2f
|
3 |
-
size 3451566750
|
|
|
|
|
|
|
|
model-00003-of-00009.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a1dc0f607c8afd3887bd61bc30412c88e241a247357ff709a711ecc7706f3b11
|
3 |
+
size 4821008667
|
model-00004-of-00009.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:207aada8f2b464e4dfacf47ba36ef0d7f57720c5138dfd85fb822d031758e292
|
3 |
+
size 4821008730
|
model-00005-of-00009.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:19f80924359b0719fdc8cfc2973a7c936df599a3d8dc2bc4b5ffebaf3f9e77d4
|
3 |
+
size 4821008772
|
model-00006-of-00009.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:38b2c63b7bbb4f7ac0d65e70ffca664aeb497628b32228ce56759ed63328556f
|
3 |
+
size 4821008771
|
model-00007-of-00009.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9bcb7e82f4c27ecf2aa5696353a024b4ce2bcceb084f960fa0ef2b23e624676b
|
3 |
+
size 4821008768
|
model-00008-of-00009.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ee7b22d6f350b79f68c2933e0f488a8306b700744c7aeb64e2b2da963ea1b50c
|
3 |
+
size 4821008765
|
model-00009-of-00009.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:553c0c6694a970661d23edc3c6d4bf1a5856dc0312ddbcdfcb853637e8eea182
|
3 |
+
size 2751380104
|
model.safetensors.index.json
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
special_tokens_map.json
CHANGED
@@ -14,7 +14,7 @@
|
|
14 |
"single_word": false
|
15 |
},
|
16 |
"pad_token": {
|
17 |
-
"content": "<|
|
18 |
"lstrip": false,
|
19 |
"normalized": false,
|
20 |
"rstrip": false,
|
|
|
14 |
"single_word": false
|
15 |
},
|
16 |
"pad_token": {
|
17 |
+
"content": "<|reserved_200017|>",
|
18 |
"lstrip": false,
|
19 |
"normalized": false,
|
20 |
"rstrip": false,
|
tokenizer_config.json
CHANGED
@@ -177,7 +177,9 @@
|
|
177 |
"input_ids",
|
178 |
"attention_mask"
|
179 |
],
|
180 |
-
"model_max_length":
|
181 |
-
"pad_token": "<|
|
182 |
-
"
|
|
|
|
|
183 |
}
|
|
|
177 |
"input_ids",
|
178 |
"attention_mask"
|
179 |
],
|
180 |
+
"model_max_length": 131072,
|
181 |
+
"pad_token": "<|reserved_200017|>",
|
182 |
+
"padding_side": "left",
|
183 |
+
"tokenizer_class": "PreTrainedTokenizerFast",
|
184 |
+
"unk_token": null
|
185 |
}
|