ggml-org/ggml

Suggestion: Interactive Demo (second example code)

Open

#31 ouverte le 3 mars 2023

Voir sur GitHub
 (2 commentaires) (0 réactions) (0 assignés)C++ (1 646 forks)auto 404
enhancementgood first issue

Métriques du dépôt

Stars
 (14 741 stars)
Métriques de merge PR
 (Merge moyen 33m) (12 PRs mergées en 30 j)

Description

Is it possible to modify the C++ to create a second example source code file, that loads the model once, before sending new prompts read in a loop from STDIN?

After backing up the original C++ source code file, I modified the code to read a prompt from STDIN in a loop, instead of argv. There were no errors going through the loop, generating responses, except I seem to be processing new responses from the first prompt read from STDIN, over again, instead processing the new subsequent prompts read from STDIN.

The funny part, is these unintended results may be useful for prompt engineering in the future, to keep the context. But first, the goal would be to try save time by avoiding reloads of the model for generating responses to each new prompt in a loop. Lastly, this is a suggestion for a second separate example source code file. The first example code source code file is correct and very useful.

Guide contributeur