#!/usr/bin/env python3
import sys
sys.path.insert(0, 'c:/MONIKA')
from salience_os_seed.proto_lm._torch_impl import ProtoLanguageModel, TrainingConfig

# Create fresh model
m = ProtoLanguageModel(TrainingConfig(checkpoint_path=None))

# Train heavily on one exact phrase
phrase = "Hello I am Monika"
for i in range(100):
    m.training_step(phrase)
    if i % 20 == 19:
        print(f"Step {i+1}: loss={m._latest_loss:.6f}")

# Test with greedy decoding (temperature=0.0001)
print("\nTesting generation:")
result = m.sample("Hello I am", max_tokens=10, temperature=0.0001, repetition_penalty=1.0)
print(f"Output: {result}")
