#CodeLlama not generating

23 messages · Page 1 of 1 (latest)

worn dove
#

Hi there! I'm in the openrouter playground trying to use CodeLlama and it's just stuck like this not outputting anything.

rose heath
#

Just tested - seems to be working for me :d...

#

Possible that the server got overloaded....

worn dove
#

Hmm maybe, are you passing anything into the system prompt?

#

Here's my system prompt:

The hash of a 0-indexed string s of length k, given integers p and m, is computed using the following function:

hash(s, p, m) = (val(s[0]) * p0 + val(s[1]) * p1 + ... + val(s[k-1]) * pk-1) mod m.
Where val(s[i]) represents the index of s[i] in the alphabet from val('a') = 1 to val('z') = 26.

You are given a string s and the integers power, modulo, k, and hashValue. Return sub, the first substring of s of length k such that hash(sub, power, modulo) == hashValue.

The test cases will be generated such that an answer always exists.

A substring is a contiguous non-empty sequence of characters within a string.

Example 1:

Input: s = "leetcode", power = 7, modulo = 20, k = 2, hashValue = 0
Output: "ee"
Explanation: The hash of "ee" can be computed to be hash("ee", 7, 20) = (5 * 1 + 5 * 7) mod 20 = 40 mod 20 = 0.
"ee" is the first substring of length 2 with hashValue 0. Hence, we return "ee".
Example 2:

Input: s = "fbxzaad", power = 31, modulo = 100, k = 3, hashValue = 32
Output: "fbx"
Explanation: The hash of "fbx" can be computed to be hash("fbx", 31, 100) = (6 * 1 + 2 * 31 + 24 * 312) mod 100 = 23132 mod 100 = 32.
The hash of "bxz" can be computed to be hash("bxz", 31, 100) = (2 * 1 + 24 * 31 + 26 * 312) mod 100 = 25732 mod 100 = 32.
"fbx" is the first substring of length 3 with hashValue 32. Hence, we return "fbx".
Note that "bxz" also has a hash of 32 but it appears later than "fbx".

Constraints:

1 <= k <= s.length <= 2 * 104
1 <= power, modulo <= 109
0 <= hashValue < modulo
s consists of lowercase English letters only.
The test cases are generated such that an answer always exists.

My chat:

Here's your starting code:

class Solution(object):
def subStrHash(self, s, power, modulo, k, hashValue):
"""
:type s: str
:type power: int
:type modulo: int
:type k: int
:type hashValue: int
:rtype: str
"""

Any my params are:

temp: 0.3
Top P: 0.5
Max Tokens: 4000
Chat Memory: 42

Just tried again and still nothing.

rose heath
#

Hmm, I think it's bc you changed BOTH temp and top_p

worn dove
#

Hmm, that's weird that that would be a problem. Most other models let us change both, no?

rose heath
#

The rec is that if you use one, you shouldn't change the other: https://community.openai.com/t/a-better-explanation-of-top-p/2426

OpenAI Developer Forum

The tooltip for “Top P” in playground doesn’t really tell me what it does, qualitatively. I get that higher numbers get more diverse options for outputs considered, but I don’t have a good sense for practical differences. Can someone provide some examples of when or why one would want that high or low? The tool tip example says 0.5 means it wil...

#

You can indeed still submit both, but it will likely... bork the model lol

worn dove
#

Ah, I see. I just reset Top P and kept Temprerature at 0.3 and I'm still getting the same issue.

rose heath
#

Fascinating, seeing the same thing

#

I'm not sure what's causing it tbh, we send that to the model

#

it could be that temp too low?...

#

if you reset it to default it should work - so with that as a baseline, I wonder which one is the cutoff

worn dove
#

Hmm, possible. I'll try resetings the temp and changing the Top P.

#

Ya no even with the Temp at the default 0.880 and the Top P at 0.3 it doesn't work.

#

And when I set both Temp and Top P to default it works...

tiny mason
worn dove
rose heath
worn dove
#

Not sure lol. Do you think it's an issue with OpenRouter or the model itself?

rose heath