mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-10 17:14:36 +00:00
updated lite (+2 squashed commit)
Squashed commit: [31a99e1f] bump baned phrase a bit more again [c999736b] small fix
This commit is contained in:
parent
3dab63887f
commit
5ad826b82a
3 changed files with 36 additions and 16 deletions
2
expose.h
2
expose.h
|
@ -2,7 +2,7 @@
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
const int stop_token_max = 32;
|
const int stop_token_max = 32;
|
||||||
const int ban_token_max = 40;
|
const int ban_token_max = 48;
|
||||||
const int tensor_split_max = 16;
|
const int tensor_split_max = 16;
|
||||||
const int logit_bias_max = 32;
|
const int logit_bias_max = 32;
|
||||||
const int dry_seq_break_max = 24;
|
const int dry_seq_break_max = 24;
|
||||||
|
|
45
klite.embd
45
klite.embd
|
@ -185,6 +185,7 @@ Current version indicated by LITEVER below.
|
||||||
|
|
||||||
#navbar {
|
#navbar {
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
|
margin-left: -6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#navbar li {
|
#navbar li {
|
||||||
|
@ -199,8 +200,9 @@ Current version indicated by LITEVER below.
|
||||||
}
|
}
|
||||||
|
|
||||||
#navbar li>a {
|
#navbar li>a {
|
||||||
color: #ffffff;
|
color: #f2f2f2;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
text-shadow: rgb(33, 33, 33);
|
||||||
}
|
}
|
||||||
|
|
||||||
.settingsmenu {
|
.settingsmenu {
|
||||||
|
@ -1003,12 +1005,12 @@ Current version indicated by LITEVER below.
|
||||||
|
|
||||||
.navbar .navbar-nav .nav-link:hover {
|
.navbar .navbar-nav .nav-link:hover {
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
background-color: #bababa;
|
background-color: #4db4ea;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.connected .navbar .navbar-nav .nav-link:hover,
|
body.connected .navbar .navbar-nav .nav-link:hover,
|
||||||
.navbar .navbar-nav .nav-link.always-available:hover {
|
.navbar .navbar-nav .nav-link.always-available:hover {
|
||||||
background-color: #98bcdb;
|
background-color: #4db4ea;
|
||||||
}
|
}
|
||||||
|
|
||||||
body .navbar .navbar-nav .dropdown-item.always-available {
|
body .navbar .navbar-nav .dropdown-item.always-available {
|
||||||
|
@ -1021,7 +1023,7 @@ Current version indicated by LITEVER below.
|
||||||
|
|
||||||
.navbar .navbar-nav .nav-link:focus {
|
.navbar .navbar-nav .nav-link:focus {
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
background-color: #bababa;
|
background-color: #4db4ea;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.connected .navbar .navbar-nav .nav-link:focus,
|
body.connected .navbar .navbar-nav .nav-link:focus,
|
||||||
|
@ -2033,6 +2035,7 @@ Current version indicated by LITEVER below.
|
||||||
{
|
{
|
||||||
padding-left: 6px;
|
padding-left: 6px;
|
||||||
padding-right: 6px;
|
padding-right: 6px;
|
||||||
|
margin-top: 0px;
|
||||||
}
|
}
|
||||||
.corpostyleitem
|
.corpostyleitem
|
||||||
{
|
{
|
||||||
|
@ -2183,8 +2186,8 @@ Current version indicated by LITEVER below.
|
||||||
|
|
||||||
.corpoleftpanel
|
.corpoleftpanel
|
||||||
{
|
{
|
||||||
width:240px;
|
width:256px;
|
||||||
background-color: #f4f4f4;
|
background-color: #e2e5e6;
|
||||||
padding-left: 8px;
|
padding-left: 8px;
|
||||||
padding-right: 8px;
|
padding-right: 8px;
|
||||||
transition: transform 0.3s ease;
|
transition: transform 0.3s ease;
|
||||||
|
@ -2200,12 +2203,13 @@ Current version indicated by LITEVER below.
|
||||||
{
|
{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
margin-top: 16px;
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
}
|
}
|
||||||
.corpo_leftpanel_btn
|
.corpo_leftpanel_btn
|
||||||
{
|
{
|
||||||
padding: 6px;
|
padding: 4px;
|
||||||
margin: 4px;
|
margin: 2px;
|
||||||
background: #f4f4f400;
|
background: #f4f4f400;
|
||||||
border:none;
|
border:none;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
|
@ -2218,15 +2222,20 @@ Current version indicated by LITEVER below.
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
user-select: none;
|
||||||
}
|
}
|
||||||
.corpo_leftpanel_btn:hover {
|
.corpo_leftpanel_btn:hover {
|
||||||
background: #dddddd;
|
background: #9dcef5;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: 8px;
|
background-position: 8px;
|
||||||
background-size: 24px;
|
background-size: 24px;
|
||||||
}
|
}
|
||||||
|
.corpo_leftpanel_btn:active {
|
||||||
|
transform: translateY(1px);
|
||||||
|
}
|
||||||
body.darkmode .corpo_leftpanel_btn:hover
|
body.darkmode .corpo_leftpanel_btn:hover
|
||||||
{
|
{
|
||||||
|
color: #76a8ee;
|
||||||
background: #454545;
|
background: #454545;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: 8px;
|
background-position: 8px;
|
||||||
|
@ -2279,6 +2288,11 @@ Current version indicated by LITEVER below.
|
||||||
}
|
}
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
|
|
||||||
|
.corpostylemain
|
||||||
|
{
|
||||||
|
margin-top: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
.corpoleftpanel {
|
.corpoleftpanel {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
@ -2306,7 +2320,7 @@ Current version indicated by LITEVER below.
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 60vh;
|
height: 75vh;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
@ -2321,6 +2335,7 @@ Current version indicated by LITEVER below.
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
padding-left: 2px;
|
padding-left: 2px;
|
||||||
padding-right: 2px;
|
padding-right: 2px;
|
||||||
|
margin-top: 12px;
|
||||||
}
|
}
|
||||||
.corpostyleinner
|
.corpostyleinner
|
||||||
{
|
{
|
||||||
|
@ -10896,8 +10911,11 @@ Current version indicated by LITEVER below.
|
||||||
|
|
||||||
function simplemodexample()
|
function simplemodexample()
|
||||||
{
|
{
|
||||||
let simplemodscript = `// This mod changes your top menu to yellow color, then displays the current temperature setting as a popup\n\n`+
|
let simplemodscript = `// This mod changes your top menu to a yellow gradient, then displays the current temperature setting as a popup\n`
|
||||||
`document.getElementById("topmenu").style.backgroundColor = 'yellow';\nalert("Congrats, your top menu turned yellow. Also, your temperature was " + localsettings.temperature);`;
|
+`\ndocument.getElementById("topmenu").style.backgroundImage = 'linear-gradient(90deg, #daa121, #daa121, #ac7a2e, #ac7a2e)';`
|
||||||
|
+`\ndocument.getElementById("topmenu").style.outline = '3px solid #daa121';`
|
||||||
|
+"\n"
|
||||||
|
+`alert("Congrats, your top menu turned yellow. Also, your temperature was " + localsettings.temperature);`;
|
||||||
document.getElementById("inputboxcontainerinputarea").value = simplemodscript;
|
document.getElementById("inputboxcontainerinputarea").value = simplemodscript;
|
||||||
}
|
}
|
||||||
function apply_user_mod()
|
function apply_user_mod()
|
||||||
|
@ -16126,7 +16144,8 @@ Current version indicated by LITEVER below.
|
||||||
<div onclick="btn_memory()" class="corpo_leftpanel_btn" type="button" style="background-image: var(--img_gear); padding-left: 44px;">Context</div>
|
<div onclick="btn_memory()" class="corpo_leftpanel_btn" type="button" style="background-image: var(--img_gear); padding-left: 44px;">Context</div>
|
||||||
<div onclick="btn_editmode()" class="corpo_leftpanel_btn" type="button" style="background-image: var(--img_corpo_edit); padding-left: 44px;">Raw Editor</div>
|
<div onclick="btn_editmode()" class="corpo_leftpanel_btn" type="button" style="background-image: var(--img_corpo_edit); padding-left: 44px;">Raw Editor</div>
|
||||||
<div onclick="update_toggle_lightmode(true)" class="corpo_leftpanel_btn" type="button" style="background-image: var(--img_corpo_theme); padding-left: 44px;">Light / Dark Theme</div>
|
<div onclick="update_toggle_lightmode(true)" class="corpo_leftpanel_btn" type="button" style="background-image: var(--img_corpo_theme); padding-left: 44px;">Light / Dark Theme</div>
|
||||||
<div style="padding:2px;font-size:14px;margin-left:8px;font-weight:600;line-height:1.1;margin-top:20px">Quick Slot Load</div>
|
<div style="padding:2px;font-size:14px;margin-left:8px;font-weight:600;line-height:1.1;margin-top:22px">Quick Slot Load</div>
|
||||||
|
<hr style="margin-top:4px;margin-bottom:6px" />
|
||||||
`;
|
`;
|
||||||
|
|
||||||
for(let i=0;i<SAVE_SLOTS;++i)
|
for(let i=0;i<SAVE_SLOTS;++i)
|
||||||
|
|
|
@ -20,7 +20,7 @@ from datetime import datetime, timezone
|
||||||
# constants
|
# constants
|
||||||
sampler_order_max = 7
|
sampler_order_max = 7
|
||||||
stop_token_max = 32
|
stop_token_max = 32
|
||||||
ban_token_max = 40
|
ban_token_max = 48
|
||||||
tensor_split_max = 16
|
tensor_split_max = 16
|
||||||
logit_bias_max = 32
|
logit_bias_max = 32
|
||||||
dry_seq_break_max = 24
|
dry_seq_break_max = 24
|
||||||
|
@ -915,8 +915,9 @@ def generate(genparams, is_quiet=False, stream_flag=False):
|
||||||
custom_token_bans = genparams.get('custom_token_bans', '')
|
custom_token_bans = genparams.get('custom_token_bans', '')
|
||||||
|
|
||||||
for tok in custom_token_bans.split(','):
|
for tok in custom_token_bans.split(','):
|
||||||
|
tok = tok.strip() # Remove leading/trailing whitespace
|
||||||
if tok.isdigit():
|
if tok.isdigit():
|
||||||
logit_biases[tok] = -999
|
logit_biases[tok] = bias_min_value
|
||||||
|
|
||||||
inputs = generation_inputs()
|
inputs = generation_inputs()
|
||||||
inputs.prompt = prompt.encode("UTF-8")
|
inputs.prompt = prompt.encode("UTF-8")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue