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

error loading model: create_tensor: tensor 'output.weight' not found #40

Open
JosephValle opened this issue Oct 23, 2024 · 0 comments
Open

Comments

@JosephValle
Copy link

Trying to run like so:

final appDocDir = await getApplicationDocumentsDirectory();
// Define the LLaMA model file path
final file = File("${appDocDir.path}/llama-3.2-1b-instruct-q 8_0.gguf");
// Check if the file exists
final bool fileExists = await file.exists();
setState(() {
isDownloaded = fileExists;
});
print("File exists: $fileExists");
print("File size: ${await file.length()}");
if (!fileExists) {
await downloadFile(file);
}

  ContextParams contextParams = ContextParams();
  int size = 32768;
  size = 8192 * 4;
  contextParams.batch = 8192 ~/ 4;
  contextParams.context = size;
  contextParams.ropeFreqBase = 57200 * 4;
  contextParams.ropeFreqScale = 0.75 / 4;


  Llama llama = Llama(file.path, ModelParams(), contextParams);

  llama.setPrompt("Your prompt here");

  // Asynchronous generation
  await for (String token in llama.prompt("Your prompt here")) {
    stdout.write(token);
  }

Getting below error in the XCode logs, but not the flutter logs

error loading model: create_tensor: tensor 'output.weight' not found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant