docs(README): rewrite adapter READMEs for clarity and alignment
Browse files
README.md
CHANGED
|
@@ -17,9 +17,11 @@ language:
|
|
| 17 |
|
| 18 |
## 🧠 Model Details
|
| 19 |
|
| 20 |
-
This is a parameter-efficient fine-tuning (PEFT) LoRA adapter
|
| 21 |
|
| 22 |
-
|
|
|
|
|
|
|
| 23 |
|
| 24 |
- **Model type:** LoRA adapter (PEFT)
|
| 25 |
- **Language(s):** English
|
|
@@ -28,30 +30,26 @@ This adapter is designed as a **demonstration and testbed** for structured tempo
|
|
| 28 |
|
| 29 |
## 🚀 Uses
|
| 30 |
|
| 31 |
-
This adapter fine-tunes Phi-4-mini-instruct for parsing natural date
|
|
|
|
| 32 |
|
| 33 |
Example prompt:
|
| 34 |
|
| 35 |
```
|
| 36 |
-
$ You are a precise temporal parser. Your only job is to translate natural language date expressions into structured DSL function calls.
|
| 37 |
> on the last day of next month
|
| 38 |
< SET_MONTH_DAY(OFFSET(TODAY, 1, MONTH), -1)
|
| 39 |
```
|
| 40 |
|
| 41 |
-
It is a useful starting point for prototyping DSL-based schedulers, assistants, or natural language interfaces requiring structured temporal interpretation.
|
| 42 |
-
|
| 43 |
-
The DSL produced by this model is defined and executed by the [Mini Date Converter DSL module](https://github.com/gh9869827/fifo-dev-dsl/tree/main/fifo_dev_dsl/domain_specific/mini_date_converter_dsl).
|
| 44 |
-
|
| 45 |
-
|
| 46 |
## ⚠️ Out-of-Scope Use
|
| 47 |
|
| 48 |
-
This
|
| 49 |
|
| 50 |
## 🏗️ Training Details
|
| 51 |
|
| 52 |
-
Trained on [a6188466/mini-date-converter-dsl-dataset](https://huggingface.co/datasets/a6188466/mini-date-converter-dsl-dataset) using the `dsl` adapter from [`fifo-tool-datasets`](https://github.com/gh9869827/fifo-tool-datasets) and [`fine_tune.py`](https://github.com/gh9869827/fifo-tool-airlock-model-env).
|
| 53 |
|
| 54 |
-
- **Dataset:** 137 hand-curated examples mapping natural language to DSL commands
|
| 55 |
- **Epochs:** 15
|
| 56 |
- **Batch size:** 1
|
| 57 |
- **Precision:** bf16
|
|
@@ -88,19 +86,28 @@ Trained on [a6188466/mini-date-converter-dsl-dataset](https://huggingface.co/dat
|
|
| 88 |
## ✅ Evaluation
|
| 89 |
|
| 90 |
- **Eval set:** Natural language queries similar in structure and intent to the training examples
|
| 91 |
-
- **Metric:** Functional equivalence — two DSL expressions are considered correct
|
| 92 |
- **Results:**
|
|
|
|
| 93 |
- **Test, variation 1:** **334/336** passed (**99.40%**)
|
| 94 |
- **Test, variation 2:** **308/336** passed (**91.67%**)
|
| 95 |
|
| 96 |
-
The two variations
|
| 97 |
-
- **Variation 1:** Alternate phrasings of template-based date
|
| 98 |
-
- **Variation 2:** Compositional expressions involving
|
| 99 |
|
| 100 |
-
These results demonstrate
|
| 101 |
|
| 102 |
Evaluation script: [`evaluate_mini_date_converter_dsl_model.py`](https://github.com/gh9869827/fifo-dev-dsl/blob/main/fifo_dev_dsl/domain_specific/mini_date_converter_dsl/evaluate_mini_date_converter_dsl_model.py)
|
| 103 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 104 |
## 🪪 License
|
| 105 |
|
| 106 |
MIT License. See [LICENSE](LICENSE) for details.
|
|
|
|
| 17 |
|
| 18 |
## 🧠 Model Details
|
| 19 |
|
| 20 |
+
This model is a parameter-efficient fine-tuning (PEFT) LoRA adapter, designed as a **demonstration and testbed** for the [Mini Date Converter DSL module](https://github.com/gh9869827/fifo-dev-dsl/tree/main/fifo_dev_dsl/domain_specific/mini_date_converter_dsl).
|
| 21 |
|
| 22 |
+
It is provided for demonstration and experimentation purposes only.
|
| 23 |
+
|
| 24 |
+
It translates English natural language date and time references, such as "next Friday" or "last day of August", into structured function calls using that custom DSL.
|
| 25 |
|
| 26 |
- **Model type:** LoRA adapter (PEFT)
|
| 27 |
- **Language(s):** English
|
|
|
|
| 30 |
|
| 31 |
## 🚀 Uses
|
| 32 |
|
| 33 |
+
This adapter fine-tunes `Phi-4-mini-instruct` for parsing natural language date and time references into DSL format. It supports the DSL functions defined
|
| 34 |
+
in the [Mini Date Converter DSL module](https://github.com/gh9869827/fifo-dev-dsl/tree/main/fifo_dev_dsl/domain_specific/mini_date_converter_dsl).
|
| 35 |
|
| 36 |
Example prompt:
|
| 37 |
|
| 38 |
```
|
| 39 |
+
$ You are a precise temporal parser. Your only job is to translate natural language date expressions into structured DSL function calls such as OFFSET(...) or DATE_FROM_MONTH_DAY(...). Do not explain or elaborate. Only return the code.
|
| 40 |
> on the last day of next month
|
| 41 |
< SET_MONTH_DAY(OFFSET(TODAY, 1, MONTH), -1)
|
| 42 |
```
|
| 43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
## ⚠️ Out-of-Scope Use
|
| 45 |
|
| 46 |
+
This adapter has been fine-tuned specifically as a demonstration and testbed for the [Mini Date Converter DSL module](https://github.com/gh9869827/fifo-dev-dsl/tree/main/fifo_dev_dsl/domain_specific/mini_date_converter_dsl). It is not intended for general-purpose dialogue or unrelated tasks.
|
| 47 |
|
| 48 |
## 🏗️ Training Details
|
| 49 |
|
| 50 |
+
Trained on [a6188466/mini-date-converter-dsl-dataset](https://huggingface.co/datasets/a6188466/mini-date-converter-dsl-dataset) using the `dsl` adapter from [`fifo-tool-datasets`](https://github.com/gh9869827/fifo-tool-datasets) and [`fine_tune.py`](https://github.com/gh9869827/fifo-tool-airlock-model-env/blob/main/fifo_tool_airlock_model_env/fine_tuning/phi_4/fine_tune.py).
|
| 51 |
|
| 52 |
+
- **Dataset:** 137 hand-curated examples mapping English natural language date and time references to DSL commands
|
| 53 |
- **Epochs:** 15
|
| 54 |
- **Batch size:** 1
|
| 55 |
- **Precision:** bf16
|
|
|
|
| 86 |
## ✅ Evaluation
|
| 87 |
|
| 88 |
- **Eval set:** Natural language queries similar in structure and intent to the training examples
|
| 89 |
+
- **Metric:** Functional equivalence — two DSL expressions are considered correct if they evaluate to the same result
|
| 90 |
- **Results:**
|
| 91 |
+
- **90%** on held-out [test set](https://huggingface.co/datasets/a6188466/mini-date-converter-dsl-dataset) (**45/50** passed)
|
| 92 |
- **Test, variation 1:** **334/336** passed (**99.40%**)
|
| 93 |
- **Test, variation 2:** **308/336** passed (**91.67%**)
|
| 94 |
|
| 95 |
+
The two variations target different generalization behaviors:
|
| 96 |
+
- **Variation 1:** Alternate phrasings of the template-based date expression `"the nth weekday of month"` (e.g., "the second Tuesday in March")
|
| 97 |
+
- **Variation 2:** Compositional expressions involving an offset from Variation 1 outputs, following the pattern `"two weeks after the nth weekday in month"` (e.g., "two weeks after the second Tuesday in March")
|
| 98 |
|
| 99 |
+
These results demonstrate acceptable performance on evaluated queries. However, as this is a demonstration adapter trained on a narrow dataset, performance should be carefully and independently evaluated in each individual use case.
|
| 100 |
|
| 101 |
Evaluation script: [`evaluate_mini_date_converter_dsl_model.py`](https://github.com/gh9869827/fifo-dev-dsl/blob/main/fifo_dev_dsl/domain_specific/mini_date_converter_dsl/evaluate_mini_date_converter_dsl_model.py)
|
| 102 |
|
| 103 |
+
## ⚠️ Limitations
|
| 104 |
+
|
| 105 |
+
This adapter is intended solely as a **demonstration and testbed** for the [Mini Date Converter DSL module](https://github.com/gh9869827/fifo-dev-dsl/tree/main/fifo_dev_dsl/domain_specific/mini_date_converter_dsl). It should not be used beyond that scope.
|
| 106 |
+
|
| 107 |
+
It does not cover all phrasings or edge cases of English **date and time references**. Instead, it focuses on illustrative examples that are supported by the module's [DSL functions](https://github.com/gh9869827/fifo-dev-dsl/tree/main/fifo_dev_dsl/domain_specific/mini_date_converter_dsl#-supported-dsl-functions).
|
| 108 |
+
|
| 109 |
+
This adapter is provided *as is*, without warranties or guarantees of any kind. It is intended for demonstration and experimentation only.
|
| 110 |
+
|
| 111 |
## 🪪 License
|
| 112 |
|
| 113 |
MIT License. See [LICENSE](LICENSE) for details.
|