Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
coderai
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexlab
coderai
Commits
2a5f2bf6
Commit
2a5f2bf6
authored
Mar 17, 2026
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix generate() method signature to match base class
Now accepts positional args: max_tokens, temperature, top_p, stop
parent
280b91c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
+18
-3
vulkan.py
codai/backends/vulkan.py
+18
-3
No files found.
codai/backends/vulkan.py
View file @
2a5f2bf6
...
...
@@ -524,17 +524,32 @@ class VulkanBackend(ModelBackend):
def
generate
(
self
,
prompt
:
str
,
**
kwargs
max_tokens
:
Optional
[
int
]
=
None
,
temperature
:
float
=
0.7
,
top_p
:
float
=
1.0
,
stop
:
Optional
[
List
[
str
]]
=
None
)
->
str
:
"""Generate text
from prompt
.
"""Generate text
non-streaming
.
Args:
prompt: Input prompt (or messages for chat)
**kwargs: Generation parameters
max_tokens: Maximum tokens to generate
temperature: Sampling temperature
top_p: Top-p sampling
stop: Stop sequences
Returns:
Generated text
"""
kwargs
=
{}
if
max_tokens
is
not
None
:
kwargs
[
'max_tokens'
]
=
max_tokens
if
temperature
is
not
None
:
kwargs
[
'temperature'
]
=
temperature
if
top_p
is
not
None
:
kwargs
[
'top_p'
]
=
top_p
if
stop
is
not
None
:
kwargs
[
'stop'
]
=
stop
if
self
.
model
is
None
:
raise
RuntimeError
(
"Model not loaded"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment