Skip to content

Commit 322645d

Browse files
committed
Add test for Model with GC
1 parent 2051087 commit 322645d

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

bindings/ruby/tests/test_model.rb

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,22 @@ def test_attributes
2323
assert_equal 1, model.ftype
2424
assert_equal "base", model.type
2525
end
26+
27+
def test_gc
28+
model = Whisper::Context.new(MODEL).model
29+
GC.start
30+
31+
assert_equal 51864, model.n_vocab
32+
assert_equal 1500, model.n_audio_ctx
33+
assert_equal 512, model.n_audio_state
34+
assert_equal 8, model.n_audio_head
35+
assert_equal 6, model.n_audio_layer
36+
assert_equal 448, model.n_text_ctx
37+
assert_equal 512, model.n_text_state
38+
assert_equal 8, model.n_text_head
39+
assert_equal 6, model.n_text_layer
40+
assert_equal 80, model.n_mels
41+
assert_equal 1, model.ftype
42+
assert_equal "base", model.type
43+
end
2644
end

0 commit comments

Comments
 (0)