Skip to main content

dianoia 0.1.0 copy "dianoia: ^0.1.0" to clipboard
dianoia: ^0.1.0 copied to clipboard

On-device LLM inference orchestrated in Dart, with native CPU kernels and Metal or Vulkan GPU kernels. Runs LFM3 for chat and tool calling.

example/lib/main.dart

/// A simple chat with LFM3, run on this device by dianoia.
///
/// The model bundle (`LFM3-1.7B-QAD-Q4`, written by `dianoia import-gguf`)
/// goes into the app's documents; see README.md.
library;

import 'package:flutter/material.dart';

import 'src/chat_controller.dart';
import 'src/chat_page.dart';

void main() => runApp(const DianoiaExampleApp());

class DianoiaExampleApp extends StatefulWidget {
  const DianoiaExampleApp({super.key});

  @override
  State<DianoiaExampleApp> createState() => _DianoiaExampleAppState();
}

class _DianoiaExampleAppState extends State<DianoiaExampleApp> {
  final _chat = ChatController();

  @override
  void initState() {
    super.initState();
    _chat.start();
  }

  @override
  void dispose() {
    _chat.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) => MaterialApp(
    title: 'Dianoia',
    theme: ThemeData(colorSchemeSeed: Colors.indigo),
    darkTheme: ThemeData(
      colorSchemeSeed: Colors.indigo,
      brightness: Brightness.dark,
    ),
    home: ChatPage(controller: _chat),
  );
}
0
likes
0
points
1.32k
downloads

Publisher

verified publisheratrac613.com

Weekly Downloads

On-device LLM inference orchestrated in Dart, with native CPU kernels and Metal or Vulkan GPU kernels. Runs LFM3 for chat and tool calling.

Repository (GitHub)
View/report issues

Topics

#llm #inference #ffi #metal #vulkan

License

unknown (license)

Dependencies

code_assets, crypto, hooks, logging, native_toolchain_c

More

Packages that depend on dianoia