Model Card: Streaming Terminal Log Boundary Predictor (Phi-4 LoRA)

🤖 Model Details

  • Base Model: unsloth/Phi-4-unsloth-bnb-4bit (14B Parameters)
  • Architecture: LoRA Adapters (PEFT)
  • Task: Binary Classification (Terminal Event Boundary Detection)
  • Quantization: 4-bit (bitsandbytes)
  • Language: English / Bash / Terminal XML

🎯 Intended Use

This model serves as "Model 0" for the Winter 2026 iteration of the AutoDocs project. Its primary function is to segment a continuous XML input file into distinct, logical events. The link to the project can be found here: AutoDocs (Winter 2026) Repository Specifically, this model is engineered to process continuous, timestamped terminal logs formatted in XML and determine if a specific line represents a "Boundary." Would you like me to add this to the very top of your Dataset Card or under a specific sectio

  • New Event: The start of a new phase (e.g., a new user prompt appearing, or a transition from downloading to extracting).
  • Old Event: A continuation of an ongoing process or a user keystroke (e.g., pressing Enter).

🗂️ Training Data

The model was fine-tuned on the Jaiccc/model0_boundary_predict_streaming dataset. The data utilizes a sliding-window context of 15 chunks:

  • 14 chunks of historical context.
  • 1 Target chunk to classify.
  • Heavily imbalanced data was downsampled to a 2:1 (Old:New) ratio to prevent majority-class guessing.

💻 How to Use (Inference)

import re
from unsloth import FastLanguageModel
from google.colab import userdata

# 1. Retrieve your secure token
hf_token = userdata.get('HF_TOKEN') # Or os.getenv("HF_TOKEN")

# 2. Load the Fine-Tuned Model
model, tokenizer = FastLanguageModel.from_pretrained(
    model_name = "Jaiccc/model_0_streaming_timestamp",
    max_seq_length = 4096,
    load_in_4bit = True,
    token = hf_token, 
)
FastLanguageModel.for_inference(model)

# 3. Format your prompt (ChatML)
instruction = "Your task is to analyze terminal XML logs and determine whether the timestamp in the TARGET LINE belongs to a 'new event' or an 'old event'."
input_data = "### CONTEXT (Previous Events):\n<system_output timestamp=\"10.01\">demo@server:~$ apt update</system_output>\n\n### TARGET LINE:\n<user_input timestamp=\"12.40\">s</user_input>"

prompt = f"<|im_start|>user<|im_sep|>{instruction}\n\n{input_data}<|im_end|><|im_start|>assistant<|im_sep|>"
inputs = tokenizer(prompt, return_tensors="pt").input_ids.to("cuda")

# 4. Generate Prediction
outputs = model.generate(input_ids=inputs, max_new_tokens=64, use_cache=True, temperature=0.1)
raw_output = tokenizer.batch_decode(outputs, clean_up_tokenization_spaces=True)[0]

# 5. Extract Result
m = re.search(r'<\|im_start\|>assistant<\|im_sep\|>(.*?)<\|im_end\|>', raw_output, re.S)
result = m.group(1).strip() if m else raw_output.split("assistant")[-1].strip()

print(result)
# Expected Output: "12.40, old event"
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Jaiccc/model_0_streaming_timestamp

Base model

microsoft/phi-4
Finetuned
(94)
this model