gerd.frontends.instruct
A gradio frontend to interact with the GERD instruct service.
Classes:
Name | Description |
---|---|
Global |
Singleton to store the service. |
Functions:
Name | Description |
---|---|
generate |
Generate text from the model. |
load_model |
Load a global large language model. |
Attributes:
Name | Type | Description |
---|---|---|
KIOSK_MODE |
Whether the frontend is running in kiosk mode. |
KIOSK_MODE
module-attribute
Whether the frontend is running in kiosk mode.
Kiosk mode reduces the number of options to a minimum and automatically loads the model.
Global
Singleton to store the service.
generate
Generate text from the model.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
float
|
The temperature for the generation |
required |
|
float
|
The top-p value for the generation |
required |
|
int
|
The maximum number of tokens to generate |
required |
|
str
|
The system text to set up the context |
required |
|
str
|
The user input |
()
|
Source code in gerd/frontends/instruct.py
load_model
Load a global large language model.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
str
|
The name of the model |
required |
|
str
|
Whether to use an extra LoRA |
'None'
|