Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Model): #1662 imported model does not use gpu #1723

Merged
merged 1 commit into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion extensions/model-extension/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 72,10 @@ export default class JanModelExtension extends ModelExtension {
* @param network - Optional object to specify proxy/whether to ignore SSL certificates.
* @returns A Promise that resolves when the model is downloaded.
*/
async downloadModel(model: Model, network?: { ignoreSSL?: boolean; proxy?: string }): Promise<void> {
async downloadModel(
model: Model,
network?: { ignoreSSL?: boolean; proxy?: string }
): Promise<void> {
// create corresponding directory
const modelDirPath = await joinPath([JanModelExtension._homeDir, model.id])
if (!(await fs.existsSync(modelDirPath))) await fs.mkdirSync(modelDirPath)
Expand Down Expand Up @@ -294,6 297,11 @@ export default class JanModelExtension extends ModelExtension {
name: dirName,
created: Date.now(),
description: `${dirName} - user self import model`,
metadata: {
size: binaryFileSize,
author: 'User',
tags: [],
},
}

const modelFilePath = await joinPath([
Expand Down
1 change: 0 additions & 1 deletion models/config/default-model.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 9,6 @@
"description": "User self import model",
"settings": {
"ctx_len": 4096,
"ngl": 0,
"embedding": false,
"prompt_template": "{system_message}\n### Instruction: {prompt}\n### Response:"
},
Expand Down
Loading