prelington commited on
Commit
f1a7dc4
·
verified ·
1 Parent(s): 9fb0ba3

Create inference.py

Browse files
Files changed (1) hide show
  1. inference.py +20 -0
inference.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # PyPilot Inference Script
2
+ from modeling_pypilot import PyPilotModel, PyPilotConfig
3
+
4
+ def test_inference():
5
+ print("🧪 Testing PyPilot Inference...")
6
+
7
+ config = PyPilotConfig()
8
+ model = PyPilotModel(config)
9
+
10
+ # Mock input (tokenized code)
11
+ dummy_input = torch.tensor([[1, 2, 3, 4, 5]])
12
+
13
+ with torch.no_grad():
14
+ output = model(dummy_input)
15
+
16
+ print(f"✅ Inference test passed! Output shape: {output.shape}")
17
+ return output
18
+
19
+ if __name__ == "__main__":
20
+ test_inference()