File size: 518 Bytes
f1a7dc4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# PyPilot Inference Script
from modeling_pypilot import PyPilotModel, PyPilotConfig

def test_inference():
    print("🧪 Testing PyPilot Inference...")
    
    config = PyPilotConfig()
    model = PyPilotModel(config)
    
    # Mock input (tokenized code)
    dummy_input = torch.tensor([[1, 2, 3, 4, 5]])
    
    with torch.no_grad():
        output = model(dummy_input)
    
    print(f"✅ Inference test passed! Output shape: {output.shape}")
    return output

if __name__ == "__main__":
    test_inference()