lcpp_ngin 1.0.1
lcpp_ngin: ^1.0.1 copied to clipboard
LlamaC++ Engin is a dart implementation of llama.cpp. It is a revision of lcpp from mobile artificial intelligence distribution (maid).
lcpp_ngin #
lcpp_ngin is a dart implementation of llama.cpp. It is a fork/revision of lcpp from mobile artificial intelligence distribution (maid)
Features #
- Streaming support
Getting started #
To use this package, add lcpp_ngin as a dependency in your pubspec.yaml file.
dependencies:
lcpp_ngin: ^1.0.1
then you can import llama in your Dart code
import 'package:lcpp_ngin/lcpp_ngin.dart';
Usage #
Below is a simple example of how to use llama
final llm = LlamaCpp(
lcppParams: LcppParams(
model_path: 'path/to/model',
),
);
final messages = [
ChatMessage.withRole(role: 'user', content: 'Hello World'),
];
final stream = llm.prompt(messages);
stream.listen((event) {
print(event);
});
Obtaining source #
git clone --recursive https://github.com/sheldonrobinson/LlamaCpp.git
# Ubuntu build dependencies
sudo apt -y install libomp-18-dev libvulkan-dev vulkan-tools glslc rustup ninja-build
rustup toolchain install stable
License #
This project is licensed under the MIT License - see the LICENSE file for details
MIT License
Copyright (c) 2025 Sheldon Robinson
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.