diff --git a/Tests/01_Model/LongContext12BTest.swift b/Tests/01_Model/LongContext12BTest.swift index ac325b0..df8689d 100644 --- a/Tests/01_Model/LongContext12BTest.swift +++ b/Tests/01_Model/LongContext12BTest.swift @@ -54,6 +54,67 @@ final class LongContext12BTest: XCTestCase { } } + func testFullContext2048Tokens() throws { + try XCTSkipIf(model == nil, "12B model not found") + + let promptLength = maxCtx + var tokens = [Int]() + for i in 0.. maxVal { maxVal = logits[j]; maxIdx = j } + } + genTokens.append(maxIdx) + print(" gen[\(i)]: token=\(maxIdx) logit=\(maxVal)") + } + } + + func testRepeatedTokensFullContext() throws { + try XCTSkipIf(model == nil, "12B model not found") + + let promptLength = maxCtx / 2 + for (pos, _) in (0..