Text Generation
PEFT
Safetensors
English
gpt_oss
fine-tuned
constraint-extraction
scheduling
lora
conversational
Instructions to use loitranyuki/ai-scheduler-backup with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use loitranyuki/ai-scheduler-backup with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
base_model: unsloth/gpt-oss-20b-unsloth-bnb-4bit
|
| 6 |
+
tags:
|
| 7 |
+
- fine-tuned
|
| 8 |
+
- constraint-extraction
|
| 9 |
+
- scheduling
|
| 10 |
+
- peft
|
| 11 |
+
- lora
|
| 12 |
+
pipeline_tag: text-generation
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# aischeduler-llm-20260607
|
| 16 |
+
|
| 17 |
+
Fine-tuned unsloth/gpt-oss-20b-unsloth-bnb-4bit for structured employee scheduling constraint extraction.
|
| 18 |
+
|
| 19 |
+
## Model description
|
| 20 |
+
|
| 21 |
+
Extracts `softConstraints` JSON from free-text employee crew notes and manager limitation instructions.
|
| 22 |
+
Output schema includes: `dailyTimeRestrictions`, `weeklyFrequencyLimits`, `consecutiveShiftLimits`,
|
| 23 |
+
`recurringTimeOffPatterns`, `crossDayDependencies`, `advanceNoticeRequired`, `crewSizeRestrictions`,
|
| 24 |
+
`leadershipRestrictions`, `jobTypeRestrictions`, `clientScheduleRestrictions`, `vehicleRestrictions`,
|
| 25 |
+
`interpersonalConflicts`.
|
| 26 |
+
|
| 27 |
+
## Usage
|
| 28 |
+
|
| 29 |
+
```python
|
| 30 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 31 |
+
import torch, json
|
| 32 |
+
|
| 33 |
+
model = AutoModelForCausalLM.from_pretrained("loitranyuki/aischeduler-llm-20260607", torch_dtype=torch.float16, device_map="auto")
|
| 34 |
+
tokenizer = AutoTokenizer.from_pretrained("loitranyuki/aischeduler-llm-20260607")
|
| 35 |
+
|
| 36 |
+
system_prompt = "..." # see prompts/employee_constraint_extraction.txt
|
| 37 |
+
user_text = "No evenings. Max 3 doubles per week."
|
| 38 |
+
|
| 39 |
+
messages = [
|
| 40 |
+
{"role": "system", "content": system_prompt},
|
| 41 |
+
{"role": "user", "content": user_text},
|
| 42 |
+
]
|
| 43 |
+
tokens = tokenizer.apply_chat_template(messages, return_tensors="pt").to("cuda")
|
| 44 |
+
out = model.generate(tokens, max_new_tokens=512, temperature=0.1)
|
| 45 |
+
raw = tokenizer.decode(out[0][tokens.shape[-1]:], skip_special_tokens=True)
|
| 46 |
+
constraints = json.loads(raw)
|
| 47 |
+
```
|
| 48 |
+
|
| 49 |
+
## Training
|
| 50 |
+
|
| 51 |
+
- **Framework:** Unsloth + PEFT (LoRA rank=16, alpha=32)
|
| 52 |
+
- **Quantization:** 4-bit QLoRA during training, merged to bfloat16
|
| 53 |
+
- **Target modules:** q_proj, k_proj, v_proj, o_proj
|