Compare commits

1 Commits
test ... main

Author SHA1 Message Date
c276b8e319 Rework algorithm 2025-10-02 16:30:11 +00:00
4 changed files with 3 additions and 3 deletions

View File

@@ -88,7 +88,7 @@ async function generate(job: Job) {
// request chat completion // request chat completion
const response = await complete(model, messages, { const response = await complete(model, messages, {
temperature: 1, temperature: 1.0,
minP: 0.1, minP: 0.1,
repeatPenalty: { repeatPenalty: {
penalty: 1.15, penalty: 1.15,

View File

@@ -20,7 +20,7 @@ export async function getModel(model: string) {
}); });
const modelPath = await downloader.download(); const modelPath = await downloader.download();
const llama = await getLlama({ const llama = await getLlama({
maxThreads: 6, maxThreads: 2,
}); });
return await llama.loadModel({ modelPath }); return await llama.loadModel({ modelPath });
} }

View File

@@ -1,6 +1,5 @@
import { api } from "misskey-js"; import { api } from "misskey-js";
import type { Note } from "misskey-js/entities.js"; import type { Note } from "misskey-js/entities.js";
import type { Message } from "./llm";
import { sample } from "./util"; import { sample } from "./util";
export const misskey = new api.APIClient({ export const misskey = new api.APIClient({

View File

@@ -3,6 +3,7 @@
"module": "index.ts", "module": "index.ts",
"type": "module", "type": "module",
"scripts": { "scripts": {
"build": "node-llama-cpp source download",
"start": "bun run index.ts", "start": "bun run index.ts",
"fix": "biome check --write" "fix": "biome check --write"
}, },