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

Switch to llama-simple-chat #454

Merged
merged 1 commit into from
Nov 15, 2024
Merged

Switch to llama-simple-chat #454

merged 1 commit into from
Nov 15, 2024

Conversation

ericcurtin
Copy link
Collaborator

@ericcurtin ericcurtin commented Nov 14, 2024

This is a new chat program in llama.cpp which is much simpler than the existing one we were using. It doesn't have the debug/verbose output problem and just seems higher quality in general for a simple chatbot, it's a few 100 lines of code.

Summary by Sourcery

Switch to using llama-simple-chat for a more streamlined and higher quality chat experience, removing verbose options and updating container configurations.

New Features:

  • Introduce llama-simple-chat as the new chat program, replacing the previous implementation.

Enhancements:

  • Simplify the chat execution process by removing unnecessary arguments and options.

Build:

  • Update the LLAMA_CPP_SHA in the container images to a new commit hash.

Copy link
Contributor

sourcery-ai bot commented Nov 14, 2024

Reviewer's Guide by Sourcery

This PR switches the chat implementation from llama-cli to llama-simple-chat, a simpler and more focused chat program from llama.cpp. The change involves updating the command-line arguments and upgrading the llama.cpp version in container images.

Sequence diagram for switching to llama-simple-chat

sequenceDiagram
    actor User
    participant Model as Model
    participant LlamaSimpleChat as llama-simple-chat

    User->>Model: Run chat
    Model->>LlamaSimpleChat: Execute with common_params
    LlamaSimpleChat-->>Model: Processed chat response
    Model-->>User: Return chat response
Loading

Updated class diagram for model execution

classDiagram
    class Model {
        -exec_model_path
        -exec_args
        +run(args)
    }

    Model : +run(args)
    Model : -exec_model_path
    Model : -exec_args

    note for Model "Updated to use llama-simple-chat with common_params"
Loading

File-Level Changes

Change Details Files
Switch chat implementation from llama-cli to llama-simple-chat
  • Remove llama-cli specific arguments like --in-prefix, --in-suffix, and --no-display-prompt
  • Replace command with simpler llama-simple-chat executable
  • Remove conversation mode (-cnv) flag handling
ramalama/model.py
Update llama.cpp version in container images
  • Update LLAMA_CPP_SHA from 1329c0a to af148c9
container-images/cuda/Containerfile
container-images/ramalama/Containerfile

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @ericcurtin - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Please document the functional differences between llama-cli and llama-simple-chat, particularly how features like prompt handling and prefix/suffix parameters are handled in the new implementation.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

This is a new chat program in llama.cpp which is much simpler than the
existing one we were using. It doesn't have the debug/verbose output
problem and just seems higher quality in general for a simple chatbot,
it's a few 100 lines of code.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
@ericcurtin
Copy link
Collaborator Author

This recently added llama-simple-chat program is more suited to our needs. Maybe we can actively start contributing to it, I already started:

ggerganov/llama.cpp#10291

@ericcurtin
Copy link
Collaborator Author

@rhatdan
Copy link
Member

rhatdan commented Nov 15, 2024

LGTM

@rhatdan rhatdan merged commit 8a61a4a into main Nov 15, 2024
12 checks passed
@ericcurtin ericcurtin deleted the llama-simple-chat branch November 15, 2024 10:53
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

Successfully merging this pull request may close these issues.

2 participants