aamanlamba commited on
Commit
a67de9a
·
verified ·
1 Parent(s): fcd2bde

Upload fine-tuned Phi-3 reverse payments model (NL → Structured)

Browse files
README.md ADDED
@@ -0,0 +1,298 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ base_model: microsoft/Phi-3-mini-4k-instruct
4
+ tags:
5
+ - phi-3
6
+ - lora
7
+ - payments
8
+ - finance
9
+ - information-extraction
10
+ - structured-data-extraction
11
+ - text-to-data
12
+ - finetuned
13
+ datasets:
14
+ - custom
15
+ language:
16
+ - en
17
+ pipeline_tag: text-generation
18
+ library_name: transformers
19
+ ---
20
+
21
+ # Phi-3 Mini Reverse Fine-tuned for Payments Domain
22
+
23
+ This is a **reverse** fine-tuned version of [Microsoft's Phi-3-Mini-4k-Instruct](microsoft/Phi-3-mini-4k-instruct) model, adapted for extracting structured payment metadata from natural language descriptions using LoRA (Low-Rank Adaptation).
24
+
25
+ ## Model Description
26
+
27
+ This model converts natural language payment descriptions into structured, machine-readable metadata. It performs the **opposite** task of the forward model - instead of generating human-friendly text, it extracts structured data that can be processed by payment APIs and applications.
28
+
29
+ ### Related Models
30
+
31
+ **Forward Model (Companion):** [aamanlamba/phi3-payments-finetune](https://huggingface.co/aamanlamba/phi3-payments-finetune)
32
+ - Converts structured metadata → natural language
33
+ - Use together for round-trip validation
34
+
35
+ ### Training Data
36
+
37
+ The model was trained on a dataset of 500+ synthetic payment transactions where:
38
+ - **Input**: Natural language payment descriptions
39
+ - **Output**: Structured metadata in `action(field[value], ...)` format
40
+
41
+ Transaction types covered:
42
+ - Standard payments (ACH, wire transfer, credit/debit card)
43
+ - Refunds (full and partial)
44
+ - Chargebacks and disputes
45
+ - Failed/declined transactions
46
+ - International transfers with currency conversion
47
+ - Transaction fees
48
+ - Recurring payments/subscriptions
49
+
50
+ ### Example Usage
51
+
52
+ ```python
53
+ from transformers import AutoModelForCausalLM, AutoTokenizer
54
+ from peft import PeftModel
55
+ import torch
56
+
57
+ # Load base model
58
+ base_model = "microsoft/Phi-3-mini-4k-instruct"
59
+ model = AutoModelForCausalLM.from_pretrained(
60
+ base_model,
61
+ torch_dtype=torch.float16,
62
+ device_map="auto"
63
+ )
64
+
65
+ # Load LoRA adapters (reverse model)
66
+ model = PeftModel.from_pretrained(model, "aamanlamba/phi3-payments-reverse-finetune")
67
+ tokenizer = AutoTokenizer.from_pretrained(base_model, trust_remote_code=True)
68
+
69
+ # Extract structured data
70
+ prompt = """<|system|>
71
+ You are a financial data extraction assistant that converts natural language payment descriptions into structured metadata that can be processed by payment applications.<|end|>
72
+ <|user|>
73
+ Extract structured payment information from the following description:
74
+
75
+ Your payment of USD 1,500.00 to Global Supplies Inc via wire transfer was successfully completed on 2024-10-27.<|end|>
76
+ <|assistant|>
77
+ """
78
+
79
+ inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
80
+
81
+ with torch.no_grad():
82
+ outputs = model.generate(
83
+ **inputs,
84
+ max_new_tokens=200,
85
+ temperature=0.3, # Lower temperature for more deterministic extraction
86
+ top_p=0.9,
87
+ do_sample=True
88
+ )
89
+
90
+ response = tokenizer.decode(outputs[0], skip_special_tokens=True)
91
+ structured_data = response.split("<|assistant|>")[-1].strip()
92
+ print(structured_data)
93
+ ```
94
+
95
+ **Expected output:**
96
+ ```
97
+ inform(transaction_type[payment], amount[1500.00], currency[USD], receiver[Global Supplies Inc], status[completed], method[wire_transfer], date[2024-10-27])
98
+ ```
99
+
100
+ ### Parsing the Output
101
+
102
+ ```python
103
+ import re
104
+
105
+ def parse_structured_data(structured_str: str) -> dict:
106
+ """Parse structured payment data into a dictionary"""
107
+ action_match = re.match(r'(\w+)\((.*)\)', structured_str)
108
+ if not action_match:
109
+ return None
110
+
111
+ action_type = action_match.group(1)
112
+ fields_str = action_match.group(2)
113
+
114
+ fields = {}
115
+ field_pattern = r'(\w+)\[(.*?)\]'
116
+ for match in re.finditer(field_pattern, fields_str):
117
+ field_name = match.group(1)
118
+ field_value = match.group(2)
119
+
120
+ # Convert numeric values
121
+ if field_name in ['amount', 'refund_amount', 'fee_amount', 'exchange_rate']:
122
+ try:
123
+ field_value = float(field_value)
124
+ except ValueError:
125
+ pass
126
+
127
+ fields[field_name] = field_value
128
+
129
+ return {
130
+ 'action_type': action_type,
131
+ 'fields': fields
132
+ }
133
+
134
+ # Use it
135
+ parsed = parse_structured_data(structured_data)
136
+ print(parsed)
137
+ # Output: {'action_type': 'inform', 'fields': {'transaction_type': 'payment', 'amount': 1500.0, ...}}
138
+ ```
139
+
140
+ ## Training Details
141
+
142
+ ### Training Configuration
143
+
144
+ - **Base Model**: microsoft/Phi-3-mini-4k-instruct
145
+ - **Fine-tuning Method**: LoRA (Low-Rank Adaptation)
146
+ - **Task Direction**: Natural Language → Structured Data (Reverse)
147
+ - **LoRA Rank**: 16
148
+ - **LoRA Alpha**: 32
149
+ - **Target Modules**: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
150
+ - **Quantization**: 8-bit (training), float16 (inference)
151
+ - **Training Epochs**: 3
152
+ - **Learning Rate**: 2e-4
153
+ - **Batch Size**: 1 (with 8 gradient accumulation steps)
154
+ - **Hardware**: NVIDIA RTX 3060 (12GB VRAM)
155
+ - **Training Time**: ~35-45 minutes
156
+
157
+ ### Training Loss
158
+
159
+ - Initial Loss: ~3.5-4.0
160
+ - Final Loss: ~0.8-1.2
161
+ - Validation Loss: ~1.0-1.3
162
+ - Extraction Accuracy: ~90-95% on validation set
163
+
164
+ ## Model Size
165
+
166
+ - **LoRA Adapter Size**: ~15MB (only the adapter weights, not the full model)
167
+ - **Full Model Size**: ~7GB (when combined with base model)
168
+
169
+ ## Supported Transaction Types
170
+
171
+ 1. **Payments**: Standard payment transactions with various methods
172
+ 2. **Refunds**: Full and partial refunds
173
+ 3. **Chargebacks**: Dispute and chargeback processing
174
+ 4. **Failed Payments**: Declined or failed transactions with reasons
175
+ 5. **International Transfers**: Cross-border payments with currency conversion
176
+ 6. **Fees**: Transaction and processing fees
177
+ 7. **Recurring Payments**: Subscriptions and scheduled payments
178
+ 8. **Reversals**: Payment reversals and adjustments
179
+
180
+ ## Output Format
181
+
182
+ The model extracts data in this structured format:
183
+ ```
184
+ action_type(field1[value1], field2[value2], ...)
185
+ ```
186
+
187
+ **Action Types:**
188
+ - `inform`: Informational transactions (payments, refunds, transfers)
189
+ - `alert`: Alerts and notifications (failures, chargebacks)
190
+
191
+ **Common Fields:**
192
+ - `transaction_type`: Type of transaction
193
+ - `amount`: Transaction amount (numeric)
194
+ - `currency`: Currency code (USD, EUR, GBP, etc.)
195
+ - `sender`/`receiver`/`merchant`: Party names
196
+ - `status`: Transaction status (completed, pending, failed, etc.)
197
+ - `method`: Payment method (credit_card, ACH, wire_transfer, etc.)
198
+ - `date`: Transaction date (YYYY-MM-DD)
199
+ - `reason`: Failure/chargeback reason (for alerts)
200
+
201
+ ## Use Cases
202
+
203
+ ### 1. Conversational Payment Interfaces
204
+ Extract payment details from user messages:
205
+ ```
206
+ User: "I want to send $500 to John via PayPal"
207
+ Extracted: inform(transaction_type[payment], amount[500], currency[USD], receiver[John], method[PayPal])
208
+ ```
209
+
210
+ ### 2. Email Parsing
211
+ Extract transaction data from payment notification emails automatically.
212
+
213
+ ### 3. Voice Payment Systems
214
+ Convert spoken payment descriptions into structured API calls.
215
+
216
+ ### 4. Payment API Integration
217
+ Transform natural language payment requests into API-ready parameters.
218
+
219
+ ## Limitations
220
+
221
+ - Trained on synthetic data - may require additional fine-tuning for production use
222
+ - Optimized for English language only
223
+ - Best performance on transaction patterns similar to training data
224
+ - Output format is custom - requires parsing (see example above)
225
+ - Not suitable for handling real financial transactions without validation
226
+ - Lower temperature (0.3) recommended for consistent extraction
227
+
228
+ ## Ethical Considerations
229
+
230
+ - This model was trained on synthetic, anonymized data only
231
+ - Does not contain any real customer PII or transaction data
232
+ - Should be validated for accuracy before production deployment
233
+ - Implement validation and error handling for extracted data
234
+ - Consider regulatory compliance (PCI-DSS, GDPR, etc.) in your jurisdiction
235
+ - Always verify extracted financial data before processing
236
+
237
+ ## Intended Use
238
+
239
+ **Primary Use Cases:**
240
+ - Extracting transaction data from natural language descriptions
241
+ - Building conversational payment bots
242
+ - Parsing payment notifications and emails
243
+ - Converting user requests to API parameters
244
+ - Training and demonstration purposes
245
+ - Research in financial NLP and information extraction
246
+
247
+ **Out of Scope:**
248
+ - Direct transaction processing without validation
249
+ - Real-time financial systems without error handling
250
+ - Compliance-critical data extraction
251
+ - Medical or legal payment processing
252
+
253
+ ## Performance Notes
254
+
255
+ - **Inference Speed**: ~2-3 seconds per extraction on RTX 3060
256
+ - **Temperature**: Use 0.1-0.3 for deterministic extraction
257
+ - **Validation**: Always validate output format and field values
258
+ - **Error Handling**: Implement fallbacks for malformed outputs
259
+
260
+ ## How to Cite
261
+
262
+ If you use this model in your research or application, please cite:
263
+
264
+ ```bibtex
265
+ @misc{phi3-payments-reverse-finetuned,
266
+ author = {aamanlamba},
267
+ title = {Phi-3 Mini Reverse Fine-tuned for Payments Domain},
268
+ year = {2024},
269
+ publisher = {HuggingFace},
270
+ howpublished = {\url{https://huggingface.co/aamanlamba/phi3-payments-reverse-finetune}}
271
+ }
272
+ ```
273
+
274
+ ## Training Code
275
+
276
+ The complete training code and dataset generation scripts are available on GitHub:
277
+ - **Repository**: [github.com/aamanlamba/phi3-tune-payments](https://github.com/aamanlamba/phi3-tune-payments)
278
+ - **Branch**: `reverse-structured-extraction` (this model)
279
+ - **Includes**: Reverse dataset generator, training scripts, testing utilities, parsing examples
280
+
281
+ ## Acknowledgements
282
+
283
+ - Base model: [Microsoft Phi-3-Mini-4k-Instruct](microsoft/Phi-3-mini-4k-instruct)
284
+ - Fine-tuning method: [LoRA: Low-Rank Adaptation of Large Language Models](https://arxiv.org/abs/2106.09685)
285
+ - Training framework: HuggingFace Transformers + PEFT
286
+ - Inspired by: [NVIDIA AI Workbench Phi-3 Fine-tuning Example](https://github.com/NVIDIA/workbench-example-phi3-finetune)
287
+
288
+ ## License
289
+
290
+ This model is released under the MIT license, compatible with the base Phi-3 model license.
291
+
292
+ ## Contact
293
+
294
+ For questions or issues, please open an issue on the GitHub repository or contact the author.
295
+
296
+ ---
297
+
298
+ **Note**: This is a **reverse** model for structured data extraction. For generating natural language from structured data, see the companion forward model.
adapter_config.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alpha_pattern": {},
3
+ "auto_mapping": null,
4
+ "base_model_name_or_path": "microsoft/Phi-3-mini-4k-instruct",
5
+ "bias": "none",
6
+ "corda_config": null,
7
+ "eva_config": null,
8
+ "exclude_modules": null,
9
+ "fan_in_fan_out": false,
10
+ "inference_mode": true,
11
+ "init_lora_weights": true,
12
+ "layer_replication": null,
13
+ "layers_pattern": null,
14
+ "layers_to_transform": null,
15
+ "loftq_config": {},
16
+ "lora_alpha": 32,
17
+ "lora_bias": false,
18
+ "lora_dropout": 0.05,
19
+ "megatron_config": null,
20
+ "megatron_core": "megatron.core",
21
+ "modules_to_save": null,
22
+ "peft_type": "LORA",
23
+ "qalora_group_size": 16,
24
+ "r": 16,
25
+ "rank_pattern": {},
26
+ "revision": null,
27
+ "target_modules": [
28
+ "gate_proj",
29
+ "v_proj",
30
+ "k_proj",
31
+ "up_proj",
32
+ "q_proj",
33
+ "o_proj",
34
+ "down_proj"
35
+ ],
36
+ "target_parameters": null,
37
+ "task_type": "CAUSAL_LM",
38
+ "trainable_token_indices": null,
39
+ "use_dora": false,
40
+ "use_qalora": false,
41
+ "use_rslora": false
42
+ }
adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:22ed7aa559302b2aa911b5941fb8006fa71a5d3b93130f0d233083d40bfba240
3
+ size 35668592
chat_template.jinja ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {% for message in messages %}{% if message['role'] == 'system' %}{{'<|system|>
2
+ ' + message['content'] + '<|end|>
3
+ '}}{% elif message['role'] == 'user' %}{{'<|user|>
4
+ ' + message['content'] + '<|end|>
5
+ '}}{% elif message['role'] == 'assistant' %}{{'<|assistant|>
6
+ ' + message['content'] + '<|end|>
7
+ '}}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|assistant|>
8
+ ' }}{% else %}{{ eos_token }}{% endif %}
checkpoint-100/README.md ADDED
@@ -0,0 +1,207 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: microsoft/Phi-3-mini-4k-instruct
3
+ library_name: peft
4
+ pipeline_tag: text-generation
5
+ tags:
6
+ - base_model:adapter:microsoft/Phi-3-mini-4k-instruct
7
+ - lora
8
+ - transformers
9
+ ---
10
+
11
+ # Model Card for Model ID
12
+
13
+ <!-- Provide a quick summary of what the model is/does. -->
14
+
15
+
16
+
17
+ ## Model Details
18
+
19
+ ### Model Description
20
+
21
+ <!-- Provide a longer summary of what this model is. -->
22
+
23
+
24
+
25
+ - **Developed by:** [More Information Needed]
26
+ - **Funded by [optional]:** [More Information Needed]
27
+ - **Shared by [optional]:** [More Information Needed]
28
+ - **Model type:** [More Information Needed]
29
+ - **Language(s) (NLP):** [More Information Needed]
30
+ - **License:** [More Information Needed]
31
+ - **Finetuned from model [optional]:** [More Information Needed]
32
+
33
+ ### Model Sources [optional]
34
+
35
+ <!-- Provide the basic links for the model. -->
36
+
37
+ - **Repository:** [More Information Needed]
38
+ - **Paper [optional]:** [More Information Needed]
39
+ - **Demo [optional]:** [More Information Needed]
40
+
41
+ ## Uses
42
+
43
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
44
+
45
+ ### Direct Use
46
+
47
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
48
+
49
+ [More Information Needed]
50
+
51
+ ### Downstream Use [optional]
52
+
53
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
54
+
55
+ [More Information Needed]
56
+
57
+ ### Out-of-Scope Use
58
+
59
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
60
+
61
+ [More Information Needed]
62
+
63
+ ## Bias, Risks, and Limitations
64
+
65
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
66
+
67
+ [More Information Needed]
68
+
69
+ ### Recommendations
70
+
71
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
72
+
73
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
74
+
75
+ ## How to Get Started with the Model
76
+
77
+ Use the code below to get started with the model.
78
+
79
+ [More Information Needed]
80
+
81
+ ## Training Details
82
+
83
+ ### Training Data
84
+
85
+ <!-- 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. -->
86
+
87
+ [More Information Needed]
88
+
89
+ ### Training Procedure
90
+
91
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
92
+
93
+ #### Preprocessing [optional]
94
+
95
+ [More Information Needed]
96
+
97
+
98
+ #### Training Hyperparameters
99
+
100
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
101
+
102
+ #### Speeds, Sizes, Times [optional]
103
+
104
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
105
+
106
+ [More Information Needed]
107
+
108
+ ## Evaluation
109
+
110
+ <!-- This section describes the evaluation protocols and provides the results. -->
111
+
112
+ ### Testing Data, Factors & Metrics
113
+
114
+ #### Testing Data
115
+
116
+ <!-- This should link to a Dataset Card if possible. -->
117
+
118
+ [More Information Needed]
119
+
120
+ #### Factors
121
+
122
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
123
+
124
+ [More Information Needed]
125
+
126
+ #### Metrics
127
+
128
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
129
+
130
+ [More Information Needed]
131
+
132
+ ### Results
133
+
134
+ [More Information Needed]
135
+
136
+ #### Summary
137
+
138
+
139
+
140
+ ## Model Examination [optional]
141
+
142
+ <!-- Relevant interpretability work for the model goes here -->
143
+
144
+ [More Information Needed]
145
+
146
+ ## Environmental Impact
147
+
148
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
149
+
150
+ Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
151
+
152
+ - **Hardware Type:** [More Information Needed]
153
+ - **Hours used:** [More Information Needed]
154
+ - **Cloud Provider:** [More Information Needed]
155
+ - **Compute Region:** [More Information Needed]
156
+ - **Carbon Emitted:** [More Information Needed]
157
+
158
+ ## Technical Specifications [optional]
159
+
160
+ ### Model Architecture and Objective
161
+
162
+ [More Information Needed]
163
+
164
+ ### Compute Infrastructure
165
+
166
+ [More Information Needed]
167
+
168
+ #### Hardware
169
+
170
+ [More Information Needed]
171
+
172
+ #### Software
173
+
174
+ [More Information Needed]
175
+
176
+ ## Citation [optional]
177
+
178
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
179
+
180
+ **BibTeX:**
181
+
182
+ [More Information Needed]
183
+
184
+ **APA:**
185
+
186
+ [More Information Needed]
187
+
188
+ ## Glossary [optional]
189
+
190
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
191
+
192
+ [More Information Needed]
193
+
194
+ ## More Information [optional]
195
+
196
+ [More Information Needed]
197
+
198
+ ## Model Card Authors [optional]
199
+
200
+ [More Information Needed]
201
+
202
+ ## Model Card Contact
203
+
204
+ [More Information Needed]
205
+ ### Framework versions
206
+
207
+ - PEFT 0.17.1
checkpoint-100/adapter_config.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alpha_pattern": {},
3
+ "auto_mapping": null,
4
+ "base_model_name_or_path": "microsoft/Phi-3-mini-4k-instruct",
5
+ "bias": "none",
6
+ "corda_config": null,
7
+ "eva_config": null,
8
+ "exclude_modules": null,
9
+ "fan_in_fan_out": false,
10
+ "inference_mode": true,
11
+ "init_lora_weights": true,
12
+ "layer_replication": null,
13
+ "layers_pattern": null,
14
+ "layers_to_transform": null,
15
+ "loftq_config": {},
16
+ "lora_alpha": 32,
17
+ "lora_bias": false,
18
+ "lora_dropout": 0.05,
19
+ "megatron_config": null,
20
+ "megatron_core": "megatron.core",
21
+ "modules_to_save": null,
22
+ "peft_type": "LORA",
23
+ "qalora_group_size": 16,
24
+ "r": 16,
25
+ "rank_pattern": {},
26
+ "revision": null,
27
+ "target_modules": [
28
+ "gate_proj",
29
+ "v_proj",
30
+ "k_proj",
31
+ "up_proj",
32
+ "q_proj",
33
+ "o_proj",
34
+ "down_proj"
35
+ ],
36
+ "target_parameters": null,
37
+ "task_type": "CAUSAL_LM",
38
+ "trainable_token_indices": null,
39
+ "use_dora": false,
40
+ "use_qalora": false,
41
+ "use_rslora": false
42
+ }
checkpoint-100/adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2c70a8de67e2591b1027397754c768cc7e079890b2fd6b6d43e07e3f9698df7d
3
+ size 35668592
checkpoint-100/chat_template.jinja ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {% for message in messages %}{% if message['role'] == 'system' %}{{'<|system|>
2
+ ' + message['content'] + '<|end|>
3
+ '}}{% elif message['role'] == 'user' %}{{'<|user|>
4
+ ' + message['content'] + '<|end|>
5
+ '}}{% elif message['role'] == 'assistant' %}{{'<|assistant|>
6
+ ' + message['content'] + '<|end|>
7
+ '}}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|assistant|>
8
+ ' }}{% else %}{{ eos_token }}{% endif %}
checkpoint-100/optimizer.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:58a9e32fc797b02df4256ad5d52b80acad986af9c50108b5539891994e57e494
3
+ size 71410938
checkpoint-100/rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:324170deb5dc20015588a954137d20aa12042f9cb2512ccd050e4f451f844703
3
+ size 14244
checkpoint-100/scaler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:37474017300cab5bad42353c98b7089d26307b1ff55df958c44c5ef4e970b7ad
3
+ size 988
checkpoint-100/scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:79dbc8232d8320e7c5fcb3967c692d454067836e7e745569023911caf4ebf8ff
3
+ size 1064
checkpoint-100/special_tokens_map.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "<|endoftext|>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": "<|endoftext|>",
17
+ "unk_token": {
18
+ "content": "<unk>",
19
+ "lstrip": false,
20
+ "normalized": false,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ }
24
+ }
checkpoint-100/tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
checkpoint-100/tokenizer_config.json ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": false,
3
+ "add_eos_token": false,
4
+ "add_prefix_space": null,
5
+ "added_tokens_decoder": {
6
+ "0": {
7
+ "content": "<unk>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false,
12
+ "special": true
13
+ },
14
+ "1": {
15
+ "content": "<s>",
16
+ "lstrip": false,
17
+ "normalized": false,
18
+ "rstrip": false,
19
+ "single_word": false,
20
+ "special": true
21
+ },
22
+ "2": {
23
+ "content": "</s>",
24
+ "lstrip": false,
25
+ "normalized": false,
26
+ "rstrip": true,
27
+ "single_word": false,
28
+ "special": false
29
+ },
30
+ "32000": {
31
+ "content": "<|endoftext|>",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false,
36
+ "special": true
37
+ },
38
+ "32001": {
39
+ "content": "<|assistant|>",
40
+ "lstrip": false,
41
+ "normalized": false,
42
+ "rstrip": true,
43
+ "single_word": false,
44
+ "special": true
45
+ },
46
+ "32002": {
47
+ "content": "<|placeholder1|>",
48
+ "lstrip": false,
49
+ "normalized": false,
50
+ "rstrip": true,
51
+ "single_word": false,
52
+ "special": true
53
+ },
54
+ "32003": {
55
+ "content": "<|placeholder2|>",
56
+ "lstrip": false,
57
+ "normalized": false,
58
+ "rstrip": true,
59
+ "single_word": false,
60
+ "special": true
61
+ },
62
+ "32004": {
63
+ "content": "<|placeholder3|>",
64
+ "lstrip": false,
65
+ "normalized": false,
66
+ "rstrip": true,
67
+ "single_word": false,
68
+ "special": true
69
+ },
70
+ "32005": {
71
+ "content": "<|placeholder4|>",
72
+ "lstrip": false,
73
+ "normalized": false,
74
+ "rstrip": true,
75
+ "single_word": false,
76
+ "special": true
77
+ },
78
+ "32006": {
79
+ "content": "<|system|>",
80
+ "lstrip": false,
81
+ "normalized": false,
82
+ "rstrip": true,
83
+ "single_word": false,
84
+ "special": true
85
+ },
86
+ "32007": {
87
+ "content": "<|end|>",
88
+ "lstrip": false,
89
+ "normalized": false,
90
+ "rstrip": true,
91
+ "single_word": false,
92
+ "special": true
93
+ },
94
+ "32008": {
95
+ "content": "<|placeholder5|>",
96
+ "lstrip": false,
97
+ "normalized": false,
98
+ "rstrip": true,
99
+ "single_word": false,
100
+ "special": true
101
+ },
102
+ "32009": {
103
+ "content": "<|placeholder6|>",
104
+ "lstrip": false,
105
+ "normalized": false,
106
+ "rstrip": true,
107
+ "single_word": false,
108
+ "special": true
109
+ },
110
+ "32010": {
111
+ "content": "<|user|>",
112
+ "lstrip": false,
113
+ "normalized": false,
114
+ "rstrip": true,
115
+ "single_word": false,
116
+ "special": true
117
+ }
118
+ },
119
+ "bos_token": "<s>",
120
+ "clean_up_tokenization_spaces": false,
121
+ "eos_token": "<|endoftext|>",
122
+ "extra_special_tokens": {},
123
+ "legacy": false,
124
+ "model_max_length": 4096,
125
+ "pad_token": "<|endoftext|>",
126
+ "padding_side": "right",
127
+ "sp_model_kwargs": {},
128
+ "tokenizer_class": "LlamaTokenizer",
129
+ "unk_token": "<unk>",
130
+ "use_default_system_prompt": false
131
+ }
checkpoint-100/trainer_state.json ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_global_step": 100,
3
+ "best_metric": 0.23627299070358276,
4
+ "best_model_checkpoint": "./phi3-payments-reverse-finetuned\\checkpoint-100",
5
+ "epoch": 2.0,
6
+ "eval_steps": 50,
7
+ "global_step": 100,
8
+ "is_hyper_param_search": false,
9
+ "is_local_process_zero": true,
10
+ "is_world_process_zero": true,
11
+ "log_history": [
12
+ {
13
+ "epoch": 0.2,
14
+ "grad_norm": 1.149180293083191,
15
+ "learning_rate": 3.6e-05,
16
+ "loss": 2.0358,
17
+ "step": 10
18
+ },
19
+ {
20
+ "epoch": 0.4,
21
+ "grad_norm": 0.7529087662696838,
22
+ "learning_rate": 7.6e-05,
23
+ "loss": 1.798,
24
+ "step": 20
25
+ },
26
+ {
27
+ "epoch": 0.6,
28
+ "grad_norm": 0.9188901782035828,
29
+ "learning_rate": 0.000116,
30
+ "loss": 1.2619,
31
+ "step": 30
32
+ },
33
+ {
34
+ "epoch": 0.8,
35
+ "grad_norm": 0.5950552225112915,
36
+ "learning_rate": 0.00015600000000000002,
37
+ "loss": 0.7113,
38
+ "step": 40
39
+ },
40
+ {
41
+ "epoch": 1.0,
42
+ "grad_norm": 0.5578396320343018,
43
+ "learning_rate": 0.000196,
44
+ "loss": 0.4846,
45
+ "step": 50
46
+ },
47
+ {
48
+ "epoch": 1.0,
49
+ "eval_loss": 0.40434688329696655,
50
+ "eval_runtime": 23.0633,
51
+ "eval_samples_per_second": 2.168,
52
+ "eval_steps_per_second": 2.168,
53
+ "step": 50
54
+ },
55
+ {
56
+ "epoch": 1.2,
57
+ "grad_norm": 0.7984590530395508,
58
+ "learning_rate": 0.000182,
59
+ "loss": 0.3761,
60
+ "step": 60
61
+ },
62
+ {
63
+ "epoch": 1.4,
64
+ "grad_norm": 0.4209927022457123,
65
+ "learning_rate": 0.000162,
66
+ "loss": 0.2922,
67
+ "step": 70
68
+ },
69
+ {
70
+ "epoch": 1.6,
71
+ "grad_norm": 0.361447811126709,
72
+ "learning_rate": 0.000142,
73
+ "loss": 0.2698,
74
+ "step": 80
75
+ },
76
+ {
77
+ "epoch": 1.8,
78
+ "grad_norm": 0.3857899010181427,
79
+ "learning_rate": 0.000122,
80
+ "loss": 0.2565,
81
+ "step": 90
82
+ },
83
+ {
84
+ "epoch": 2.0,
85
+ "grad_norm": 0.30109161138534546,
86
+ "learning_rate": 0.00010200000000000001,
87
+ "loss": 0.2459,
88
+ "step": 100
89
+ },
90
+ {
91
+ "epoch": 2.0,
92
+ "eval_loss": 0.23627299070358276,
93
+ "eval_runtime": 20.8349,
94
+ "eval_samples_per_second": 2.4,
95
+ "eval_steps_per_second": 2.4,
96
+ "step": 100
97
+ }
98
+ ],
99
+ "logging_steps": 10,
100
+ "max_steps": 150,
101
+ "num_input_tokens_seen": 0,
102
+ "num_train_epochs": 3,
103
+ "save_steps": 100,
104
+ "stateful_callbacks": {
105
+ "TrainerControl": {
106
+ "args": {
107
+ "should_epoch_stop": false,
108
+ "should_evaluate": false,
109
+ "should_log": false,
110
+ "should_save": true,
111
+ "should_training_stop": false
112
+ },
113
+ "attributes": {}
114
+ }
115
+ },
116
+ "total_flos": 9170514345984000.0,
117
+ "train_batch_size": 1,
118
+ "trial_name": null,
119
+ "trial_params": null
120
+ }
checkpoint-100/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:24f90672e9aadeb1cee3d6335a1992fa5225b90bc948cee5a8175a6e01426a28
3
+ size 5368
checkpoint-150/README.md ADDED
@@ -0,0 +1,207 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: microsoft/Phi-3-mini-4k-instruct
3
+ library_name: peft
4
+ pipeline_tag: text-generation
5
+ tags:
6
+ - base_model:adapter:microsoft/Phi-3-mini-4k-instruct
7
+ - lora
8
+ - transformers
9
+ ---
10
+
11
+ # Model Card for Model ID
12
+
13
+ <!-- Provide a quick summary of what the model is/does. -->
14
+
15
+
16
+
17
+ ## Model Details
18
+
19
+ ### Model Description
20
+
21
+ <!-- Provide a longer summary of what this model is. -->
22
+
23
+
24
+
25
+ - **Developed by:** [More Information Needed]
26
+ - **Funded by [optional]:** [More Information Needed]
27
+ - **Shared by [optional]:** [More Information Needed]
28
+ - **Model type:** [More Information Needed]
29
+ - **Language(s) (NLP):** [More Information Needed]
30
+ - **License:** [More Information Needed]
31
+ - **Finetuned from model [optional]:** [More Information Needed]
32
+
33
+ ### Model Sources [optional]
34
+
35
+ <!-- Provide the basic links for the model. -->
36
+
37
+ - **Repository:** [More Information Needed]
38
+ - **Paper [optional]:** [More Information Needed]
39
+ - **Demo [optional]:** [More Information Needed]
40
+
41
+ ## Uses
42
+
43
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
44
+
45
+ ### Direct Use
46
+
47
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
48
+
49
+ [More Information Needed]
50
+
51
+ ### Downstream Use [optional]
52
+
53
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
54
+
55
+ [More Information Needed]
56
+
57
+ ### Out-of-Scope Use
58
+
59
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
60
+
61
+ [More Information Needed]
62
+
63
+ ## Bias, Risks, and Limitations
64
+
65
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
66
+
67
+ [More Information Needed]
68
+
69
+ ### Recommendations
70
+
71
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
72
+
73
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
74
+
75
+ ## How to Get Started with the Model
76
+
77
+ Use the code below to get started with the model.
78
+
79
+ [More Information Needed]
80
+
81
+ ## Training Details
82
+
83
+ ### Training Data
84
+
85
+ <!-- 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. -->
86
+
87
+ [More Information Needed]
88
+
89
+ ### Training Procedure
90
+
91
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
92
+
93
+ #### Preprocessing [optional]
94
+
95
+ [More Information Needed]
96
+
97
+
98
+ #### Training Hyperparameters
99
+
100
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
101
+
102
+ #### Speeds, Sizes, Times [optional]
103
+
104
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
105
+
106
+ [More Information Needed]
107
+
108
+ ## Evaluation
109
+
110
+ <!-- This section describes the evaluation protocols and provides the results. -->
111
+
112
+ ### Testing Data, Factors & Metrics
113
+
114
+ #### Testing Data
115
+
116
+ <!-- This should link to a Dataset Card if possible. -->
117
+
118
+ [More Information Needed]
119
+
120
+ #### Factors
121
+
122
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
123
+
124
+ [More Information Needed]
125
+
126
+ #### Metrics
127
+
128
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
129
+
130
+ [More Information Needed]
131
+
132
+ ### Results
133
+
134
+ [More Information Needed]
135
+
136
+ #### Summary
137
+
138
+
139
+
140
+ ## Model Examination [optional]
141
+
142
+ <!-- Relevant interpretability work for the model goes here -->
143
+
144
+ [More Information Needed]
145
+
146
+ ## Environmental Impact
147
+
148
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
149
+
150
+ Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
151
+
152
+ - **Hardware Type:** [More Information Needed]
153
+ - **Hours used:** [More Information Needed]
154
+ - **Cloud Provider:** [More Information Needed]
155
+ - **Compute Region:** [More Information Needed]
156
+ - **Carbon Emitted:** [More Information Needed]
157
+
158
+ ## Technical Specifications [optional]
159
+
160
+ ### Model Architecture and Objective
161
+
162
+ [More Information Needed]
163
+
164
+ ### Compute Infrastructure
165
+
166
+ [More Information Needed]
167
+
168
+ #### Hardware
169
+
170
+ [More Information Needed]
171
+
172
+ #### Software
173
+
174
+ [More Information Needed]
175
+
176
+ ## Citation [optional]
177
+
178
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
179
+
180
+ **BibTeX:**
181
+
182
+ [More Information Needed]
183
+
184
+ **APA:**
185
+
186
+ [More Information Needed]
187
+
188
+ ## Glossary [optional]
189
+
190
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
191
+
192
+ [More Information Needed]
193
+
194
+ ## More Information [optional]
195
+
196
+ [More Information Needed]
197
+
198
+ ## Model Card Authors [optional]
199
+
200
+ [More Information Needed]
201
+
202
+ ## Model Card Contact
203
+
204
+ [More Information Needed]
205
+ ### Framework versions
206
+
207
+ - PEFT 0.17.1
checkpoint-150/adapter_config.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alpha_pattern": {},
3
+ "auto_mapping": null,
4
+ "base_model_name_or_path": "microsoft/Phi-3-mini-4k-instruct",
5
+ "bias": "none",
6
+ "corda_config": null,
7
+ "eva_config": null,
8
+ "exclude_modules": null,
9
+ "fan_in_fan_out": false,
10
+ "inference_mode": true,
11
+ "init_lora_weights": true,
12
+ "layer_replication": null,
13
+ "layers_pattern": null,
14
+ "layers_to_transform": null,
15
+ "loftq_config": {},
16
+ "lora_alpha": 32,
17
+ "lora_bias": false,
18
+ "lora_dropout": 0.05,
19
+ "megatron_config": null,
20
+ "megatron_core": "megatron.core",
21
+ "modules_to_save": null,
22
+ "peft_type": "LORA",
23
+ "qalora_group_size": 16,
24
+ "r": 16,
25
+ "rank_pattern": {},
26
+ "revision": null,
27
+ "target_modules": [
28
+ "gate_proj",
29
+ "v_proj",
30
+ "k_proj",
31
+ "up_proj",
32
+ "q_proj",
33
+ "o_proj",
34
+ "down_proj"
35
+ ],
36
+ "target_parameters": null,
37
+ "task_type": "CAUSAL_LM",
38
+ "trainable_token_indices": null,
39
+ "use_dora": false,
40
+ "use_qalora": false,
41
+ "use_rslora": false
42
+ }
checkpoint-150/adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:22ed7aa559302b2aa911b5941fb8006fa71a5d3b93130f0d233083d40bfba240
3
+ size 35668592
checkpoint-150/chat_template.jinja ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {% for message in messages %}{% if message['role'] == 'system' %}{{'<|system|>
2
+ ' + message['content'] + '<|end|>
3
+ '}}{% elif message['role'] == 'user' %}{{'<|user|>
4
+ ' + message['content'] + '<|end|>
5
+ '}}{% elif message['role'] == 'assistant' %}{{'<|assistant|>
6
+ ' + message['content'] + '<|end|>
7
+ '}}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|assistant|>
8
+ ' }}{% else %}{{ eos_token }}{% endif %}
checkpoint-150/optimizer.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:90d67a6ced8139420c5f561da5be810b7072863f0cd41ae728d9bc9274e026a4
3
+ size 71410938
checkpoint-150/rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fc297314363c47f471e4c663bb1a91e44ac118f5d58e0c5023be7655e94ea928
3
+ size 14244
checkpoint-150/scaler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0bb9a43383d7ed0fc51a851e6a3c6b272b5056ec259d10618304fa6dd704548f
3
+ size 988
checkpoint-150/scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b259a97d34c7f44fb5b4e2d770a592880cc080f78a1d7b8a9c5d93bf56726ae2
3
+ size 1064
checkpoint-150/special_tokens_map.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "<|endoftext|>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": "<|endoftext|>",
17
+ "unk_token": {
18
+ "content": "<unk>",
19
+ "lstrip": false,
20
+ "normalized": false,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ }
24
+ }
checkpoint-150/tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
checkpoint-150/tokenizer_config.json ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": false,
3
+ "add_eos_token": false,
4
+ "add_prefix_space": null,
5
+ "added_tokens_decoder": {
6
+ "0": {
7
+ "content": "<unk>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false,
12
+ "special": true
13
+ },
14
+ "1": {
15
+ "content": "<s>",
16
+ "lstrip": false,
17
+ "normalized": false,
18
+ "rstrip": false,
19
+ "single_word": false,
20
+ "special": true
21
+ },
22
+ "2": {
23
+ "content": "</s>",
24
+ "lstrip": false,
25
+ "normalized": false,
26
+ "rstrip": true,
27
+ "single_word": false,
28
+ "special": false
29
+ },
30
+ "32000": {
31
+ "content": "<|endoftext|>",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false,
36
+ "special": true
37
+ },
38
+ "32001": {
39
+ "content": "<|assistant|>",
40
+ "lstrip": false,
41
+ "normalized": false,
42
+ "rstrip": true,
43
+ "single_word": false,
44
+ "special": true
45
+ },
46
+ "32002": {
47
+ "content": "<|placeholder1|>",
48
+ "lstrip": false,
49
+ "normalized": false,
50
+ "rstrip": true,
51
+ "single_word": false,
52
+ "special": true
53
+ },
54
+ "32003": {
55
+ "content": "<|placeholder2|>",
56
+ "lstrip": false,
57
+ "normalized": false,
58
+ "rstrip": true,
59
+ "single_word": false,
60
+ "special": true
61
+ },
62
+ "32004": {
63
+ "content": "<|placeholder3|>",
64
+ "lstrip": false,
65
+ "normalized": false,
66
+ "rstrip": true,
67
+ "single_word": false,
68
+ "special": true
69
+ },
70
+ "32005": {
71
+ "content": "<|placeholder4|>",
72
+ "lstrip": false,
73
+ "normalized": false,
74
+ "rstrip": true,
75
+ "single_word": false,
76
+ "special": true
77
+ },
78
+ "32006": {
79
+ "content": "<|system|>",
80
+ "lstrip": false,
81
+ "normalized": false,
82
+ "rstrip": true,
83
+ "single_word": false,
84
+ "special": true
85
+ },
86
+ "32007": {
87
+ "content": "<|end|>",
88
+ "lstrip": false,
89
+ "normalized": false,
90
+ "rstrip": true,
91
+ "single_word": false,
92
+ "special": true
93
+ },
94
+ "32008": {
95
+ "content": "<|placeholder5|>",
96
+ "lstrip": false,
97
+ "normalized": false,
98
+ "rstrip": true,
99
+ "single_word": false,
100
+ "special": true
101
+ },
102
+ "32009": {
103
+ "content": "<|placeholder6|>",
104
+ "lstrip": false,
105
+ "normalized": false,
106
+ "rstrip": true,
107
+ "single_word": false,
108
+ "special": true
109
+ },
110
+ "32010": {
111
+ "content": "<|user|>",
112
+ "lstrip": false,
113
+ "normalized": false,
114
+ "rstrip": true,
115
+ "single_word": false,
116
+ "special": true
117
+ }
118
+ },
119
+ "bos_token": "<s>",
120
+ "clean_up_tokenization_spaces": false,
121
+ "eos_token": "<|endoftext|>",
122
+ "extra_special_tokens": {},
123
+ "legacy": false,
124
+ "model_max_length": 4096,
125
+ "pad_token": "<|endoftext|>",
126
+ "padding_side": "right",
127
+ "sp_model_kwargs": {},
128
+ "tokenizer_class": "LlamaTokenizer",
129
+ "unk_token": "<unk>",
130
+ "use_default_system_prompt": false
131
+ }
checkpoint-150/trainer_state.json ADDED
@@ -0,0 +1,163 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_global_step": 150,
3
+ "best_metric": 0.22141291201114655,
4
+ "best_model_checkpoint": "./phi3-payments-reverse-finetuned\\checkpoint-150",
5
+ "epoch": 3.0,
6
+ "eval_steps": 50,
7
+ "global_step": 150,
8
+ "is_hyper_param_search": false,
9
+ "is_local_process_zero": true,
10
+ "is_world_process_zero": true,
11
+ "log_history": [
12
+ {
13
+ "epoch": 0.2,
14
+ "grad_norm": 1.149180293083191,
15
+ "learning_rate": 3.6e-05,
16
+ "loss": 2.0358,
17
+ "step": 10
18
+ },
19
+ {
20
+ "epoch": 0.4,
21
+ "grad_norm": 0.7529087662696838,
22
+ "learning_rate": 7.6e-05,
23
+ "loss": 1.798,
24
+ "step": 20
25
+ },
26
+ {
27
+ "epoch": 0.6,
28
+ "grad_norm": 0.9188901782035828,
29
+ "learning_rate": 0.000116,
30
+ "loss": 1.2619,
31
+ "step": 30
32
+ },
33
+ {
34
+ "epoch": 0.8,
35
+ "grad_norm": 0.5950552225112915,
36
+ "learning_rate": 0.00015600000000000002,
37
+ "loss": 0.7113,
38
+ "step": 40
39
+ },
40
+ {
41
+ "epoch": 1.0,
42
+ "grad_norm": 0.5578396320343018,
43
+ "learning_rate": 0.000196,
44
+ "loss": 0.4846,
45
+ "step": 50
46
+ },
47
+ {
48
+ "epoch": 1.0,
49
+ "eval_loss": 0.40434688329696655,
50
+ "eval_runtime": 23.0633,
51
+ "eval_samples_per_second": 2.168,
52
+ "eval_steps_per_second": 2.168,
53
+ "step": 50
54
+ },
55
+ {
56
+ "epoch": 1.2,
57
+ "grad_norm": 0.7984590530395508,
58
+ "learning_rate": 0.000182,
59
+ "loss": 0.3761,
60
+ "step": 60
61
+ },
62
+ {
63
+ "epoch": 1.4,
64
+ "grad_norm": 0.4209927022457123,
65
+ "learning_rate": 0.000162,
66
+ "loss": 0.2922,
67
+ "step": 70
68
+ },
69
+ {
70
+ "epoch": 1.6,
71
+ "grad_norm": 0.361447811126709,
72
+ "learning_rate": 0.000142,
73
+ "loss": 0.2698,
74
+ "step": 80
75
+ },
76
+ {
77
+ "epoch": 1.8,
78
+ "grad_norm": 0.3857899010181427,
79
+ "learning_rate": 0.000122,
80
+ "loss": 0.2565,
81
+ "step": 90
82
+ },
83
+ {
84
+ "epoch": 2.0,
85
+ "grad_norm": 0.30109161138534546,
86
+ "learning_rate": 0.00010200000000000001,
87
+ "loss": 0.2459,
88
+ "step": 100
89
+ },
90
+ {
91
+ "epoch": 2.0,
92
+ "eval_loss": 0.23627299070358276,
93
+ "eval_runtime": 20.8349,
94
+ "eval_samples_per_second": 2.4,
95
+ "eval_steps_per_second": 2.4,
96
+ "step": 100
97
+ },
98
+ {
99
+ "epoch": 2.2,
100
+ "grad_norm": 0.3074338436126709,
101
+ "learning_rate": 8.2e-05,
102
+ "loss": 0.2316,
103
+ "step": 110
104
+ },
105
+ {
106
+ "epoch": 2.4,
107
+ "grad_norm": 0.2675539255142212,
108
+ "learning_rate": 6.2e-05,
109
+ "loss": 0.2214,
110
+ "step": 120
111
+ },
112
+ {
113
+ "epoch": 2.6,
114
+ "grad_norm": 0.31314000487327576,
115
+ "learning_rate": 4.2e-05,
116
+ "loss": 0.2211,
117
+ "step": 130
118
+ },
119
+ {
120
+ "epoch": 2.8,
121
+ "grad_norm": 0.3342994451522827,
122
+ "learning_rate": 2.2000000000000003e-05,
123
+ "loss": 0.2224,
124
+ "step": 140
125
+ },
126
+ {
127
+ "epoch": 3.0,
128
+ "grad_norm": 0.33048316836357117,
129
+ "learning_rate": 2.0000000000000003e-06,
130
+ "loss": 0.2158,
131
+ "step": 150
132
+ },
133
+ {
134
+ "epoch": 3.0,
135
+ "eval_loss": 0.22141291201114655,
136
+ "eval_runtime": 17.435,
137
+ "eval_samples_per_second": 2.868,
138
+ "eval_steps_per_second": 2.868,
139
+ "step": 150
140
+ }
141
+ ],
142
+ "logging_steps": 10,
143
+ "max_steps": 150,
144
+ "num_input_tokens_seen": 0,
145
+ "num_train_epochs": 3,
146
+ "save_steps": 100,
147
+ "stateful_callbacks": {
148
+ "TrainerControl": {
149
+ "args": {
150
+ "should_epoch_stop": false,
151
+ "should_evaluate": false,
152
+ "should_log": false,
153
+ "should_save": true,
154
+ "should_training_stop": true
155
+ },
156
+ "attributes": {}
157
+ }
158
+ },
159
+ "total_flos": 1.3755771518976e+16,
160
+ "train_batch_size": 1,
161
+ "trial_name": null,
162
+ "trial_params": null
163
+ }
checkpoint-150/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:24f90672e9aadeb1cee3d6335a1992fa5225b90bc948cee5a8175a6e01426a28
3
+ size 5368
special_tokens_map.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "<|endoftext|>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": "<|endoftext|>",
17
+ "unk_token": {
18
+ "content": "<unk>",
19
+ "lstrip": false,
20
+ "normalized": false,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ }
24
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": false,
3
+ "add_eos_token": false,
4
+ "add_prefix_space": null,
5
+ "added_tokens_decoder": {
6
+ "0": {
7
+ "content": "<unk>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false,
12
+ "special": true
13
+ },
14
+ "1": {
15
+ "content": "<s>",
16
+ "lstrip": false,
17
+ "normalized": false,
18
+ "rstrip": false,
19
+ "single_word": false,
20
+ "special": true
21
+ },
22
+ "2": {
23
+ "content": "</s>",
24
+ "lstrip": false,
25
+ "normalized": false,
26
+ "rstrip": true,
27
+ "single_word": false,
28
+ "special": false
29
+ },
30
+ "32000": {
31
+ "content": "<|endoftext|>",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false,
36
+ "special": true
37
+ },
38
+ "32001": {
39
+ "content": "<|assistant|>",
40
+ "lstrip": false,
41
+ "normalized": false,
42
+ "rstrip": true,
43
+ "single_word": false,
44
+ "special": true
45
+ },
46
+ "32002": {
47
+ "content": "<|placeholder1|>",
48
+ "lstrip": false,
49
+ "normalized": false,
50
+ "rstrip": true,
51
+ "single_word": false,
52
+ "special": true
53
+ },
54
+ "32003": {
55
+ "content": "<|placeholder2|>",
56
+ "lstrip": false,
57
+ "normalized": false,
58
+ "rstrip": true,
59
+ "single_word": false,
60
+ "special": true
61
+ },
62
+ "32004": {
63
+ "content": "<|placeholder3|>",
64
+ "lstrip": false,
65
+ "normalized": false,
66
+ "rstrip": true,
67
+ "single_word": false,
68
+ "special": true
69
+ },
70
+ "32005": {
71
+ "content": "<|placeholder4|>",
72
+ "lstrip": false,
73
+ "normalized": false,
74
+ "rstrip": true,
75
+ "single_word": false,
76
+ "special": true
77
+ },
78
+ "32006": {
79
+ "content": "<|system|>",
80
+ "lstrip": false,
81
+ "normalized": false,
82
+ "rstrip": true,
83
+ "single_word": false,
84
+ "special": true
85
+ },
86
+ "32007": {
87
+ "content": "<|end|>",
88
+ "lstrip": false,
89
+ "normalized": false,
90
+ "rstrip": true,
91
+ "single_word": false,
92
+ "special": true
93
+ },
94
+ "32008": {
95
+ "content": "<|placeholder5|>",
96
+ "lstrip": false,
97
+ "normalized": false,
98
+ "rstrip": true,
99
+ "single_word": false,
100
+ "special": true
101
+ },
102
+ "32009": {
103
+ "content": "<|placeholder6|>",
104
+ "lstrip": false,
105
+ "normalized": false,
106
+ "rstrip": true,
107
+ "single_word": false,
108
+ "special": true
109
+ },
110
+ "32010": {
111
+ "content": "<|user|>",
112
+ "lstrip": false,
113
+ "normalized": false,
114
+ "rstrip": true,
115
+ "single_word": false,
116
+ "special": true
117
+ }
118
+ },
119
+ "bos_token": "<s>",
120
+ "clean_up_tokenization_spaces": false,
121
+ "eos_token": "<|endoftext|>",
122
+ "extra_special_tokens": {},
123
+ "legacy": false,
124
+ "model_max_length": 4096,
125
+ "pad_token": "<|endoftext|>",
126
+ "padding_side": "right",
127
+ "sp_model_kwargs": {},
128
+ "tokenizer_class": "LlamaTokenizer",
129
+ "unk_token": "<unk>",
130
+ "use_default_system_prompt": false
131
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:24f90672e9aadeb1cee3d6335a1992fa5225b90bc948cee5a8175a6e01426a28
3
+ size 5368