Views
No views yet
meta-llama/Llama-3.2-1B-Instruct1) or not (0) before shipment, using structured order-level features. The project demonstrates how instruction fine-tuning of LLMs can be applied to supply chain risk management.0/1 and do not provide uncertainty estimates unless re-trained for probabilities.1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model = AutoModelForCausalLM.from_pretrained("yuchi/DelaySentinel")
4tokenizer = AutoTokenizer.from_pretrained("yuchi/DelaySentinel")
5
6system = "You are a supply-chain analyst. Output only 0 or 1: 1=Delay, 0=Not delay."
7user = "order_id: 123\norigin_region: OH\ndest_region: CA\ncarrier: A1\nservice_level: ground\nweight_kg: 10.5\ndistance_km: 3500\nholiday_flag: 0"
8prompt = f"<|system|>{system}\n<|user|>{user}\n<|assistant|>"
9
10out = model.generate(**tokenizer(prompt, return_tensors="pt"), max_new_tokens=2)
11print(tokenizer.decode(out[0], skip_special_tokens=True).split("<|assistant|>")[-1].strip())