📅 Model Card for mini-date-converter-dsl-adapter
🧠 Model Details
This model is a parameter-efficient fine-tuning (PEFT) LoRA adapter, designed as a demonstration and testbed for the Mini Date Converter DSL module.
It is provided for demonstration and experimentation purposes only.
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.
- Model type: LoRA adapter (PEFT)
- Language(s): English
- License: MIT
- Finetuned from model:
microsoft/Phi-4-mini-instruct
🚀 Uses
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
in the Mini Date Converter DSL module.
Example prompt:
$ 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.
> on the last day of next month
< SET_MONTH_DAY(OFFSET(TODAY, 1, MONTH), -1)
⚠️ Out-of-Scope Use
This adapter has been fine-tuned specifically as a demonstration and testbed for the Mini Date Converter DSL module. It is not intended for general-purpose dialogue or unrelated tasks.
🏗️ Training Details
Trained on a6188466/mini-date-converter-dsl-dataset using the dsl
adapter from fifo-tool-datasets
and fine_tune.py
.
- Dataset: 137 hand-curated examples mapping English natural language date and time references to DSL commands
- Epochs: 15
- Batch size: 1
- Precision: bf16
- Framework:
transformers
,peft
,trl
(SFTTrainer)
⚙️ Training Hyperparameters
{
"num_train_epochs": 15,
"train_batch_size": 1,
"learning_rate": 5e-06,
"lr_scheduler_type": "cosine",
"warmup_ratio": 0.2,
"bf16": true,
"seed": 0
}
📈 Training Results
{
"mean_token_accuracy": 0.9563815355300903,
"total_flos": 2946032837130240.0,
"train_loss": 0.6184668624488107,
"train_runtime": 487.3092,
"train_samples_per_second": 4.217,
"train_steps_per_second": 4.217,
"final_learning_rate": 1.0269727355813331e-09
}
✅ Evaluation
- Eval set: Natural language queries similar in structure and intent to the training examples
- Metric: Functional equivalence — two DSL expressions are considered correct if they evaluate to the same result
- Results:
- 90% on held-out test set (45/50 passed)
- Test, variation 1: 334/336 passed (99.40%)
- Test, variation 2: 308/336 passed (91.67%)
The two variations target different generalization behaviors:
- Variation 1: Alternate phrasings of the template-based date expression
"the nth weekday of month"
(e.g., "the second Tuesday in March") - 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")
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.
Evaluation script: evaluate_mini_date_converter_dsl_model.py
⚠️ Disclaimer & Limitations
This adapter is intended solely as a demonstration and testbed for the Mini Date Converter DSL module. It should not be used beyond that scope.
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.
This adapter is provided as is, without warranties or guarantees of any kind. It is intended for demonstration and experimentation only.
🪪 License
MIT License. See LICENSE for details.
📬 Contact
For questions, feedback, or bug reports, please open an issue on GitHub or start a discussion on the Hugging Face Hub.
- Downloads last month
- 3
Model tree for a6188466/mini-date-converter-dsl-adapter
Base model
microsoft/Phi-4-mini-instruct