chore: set default context length to 2048 (#2776)
Co-authored-by: James <james@jan.ai>
This commit is contained in:
parent
252858743a
commit
83e9e2b80a
@ -853,7 +853,7 @@ export default class JanModelExtension extends ModelExtension {
|
||||
if (config.max_sequence_length) return config.max_sequence_length
|
||||
if (config.max_position_embeddings) return config.max_position_embeddings
|
||||
if (config.n_ctx) return config.n_ctx
|
||||
return 4096
|
||||
return 2048
|
||||
}
|
||||
|
||||
/**
|
||||
@ -883,7 +883,7 @@ export default class JanModelExtension extends ModelExtension {
|
||||
} catch (err) {
|
||||
log(`[Conversion]::Debug: Error using hf-to-gguf.py, trying convert.py`)
|
||||
|
||||
let ctx = 4096
|
||||
let ctx = 2048
|
||||
try {
|
||||
const config = await fs.readFileSync(
|
||||
await joinPath([modelDirPath, 'config.json']),
|
||||
|
||||
@ -36,7 +36,7 @@ export const presetConfiguration: Record<string, SettingComponentProps> = {
|
||||
min: 0,
|
||||
max: 4096,
|
||||
step: 128,
|
||||
value: 4096,
|
||||
value: 2048,
|
||||
},
|
||||
requireModelReload: true,
|
||||
configType: 'setting',
|
||||
|
||||
@ -31,7 +31,7 @@ export const getConfigurationsData = (
|
||||
componentSetting.controllerProps.max =
|
||||
selectedModel?.settings.ctx_len ||
|
||||
componentSetting.controllerProps.max ||
|
||||
4096
|
||||
2048
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user