Can Taalas really implement models in hardware that run 1000x more efficiently than GPUs?
I played with chatjimmy.ai. It was so fast that it felt fake.
HC1 demonstrates the power of Taalas hardcore model silicon technology, delivering 17k tokens per second per user on Llama 3.1 8B model. I can hardly wait for translation devices and personal assistants with this kind of speed.
Limitations
A Test Run 0.090s @ 15600 tokens per second.
I asked their demonstration website chatjimmy.ai to build a tic-tac-toe game in Flutter using the following prompt. This is a one-shot prompt with zero context, no rules, and no skills.
Build a Flutter application that plays tic tac toe using Flutter widgets that will run as a mobile Flutter application using the material theme.
Support light and dark mode with a switch. Create unit tests
chatjimmi.ai generated the following. The returned information includes the Dart code and changes required in the configuration (pubspec.yaml).
Build a Flutter application that plays tic tac toe using Flutter widgets that will run as a mobile Flutter application using the material theme.
Support light and dark mode with a switch. Create unit tests
Here is an example of a simple Tic Tac Toe game built with Flutter using the Material Theme. I will also cover the implementation of a switch to toggle between light and dark mode.
pubspec.yaml
name: tic_tac_toe description: A simple Tic Tac Toe game version: 1.0.0+1 environment: sdk: '>=2.7.0 <3.0.0' dependency_overrides: flutter: version: ^2.0.6 dependencies: flutter: path: ../../../../..//flutter flutter: uses-material-design: true assets: - assets/
main.dart
import 'package:flutter/material.dart'; import 'tic_tac_toe.dart'; import 'package:provider/provider.dart'; import 'dart:io' as flutter; void main() { runApp( MultiProvider( child: MaterialApp( title: 'Tic Tac Toe', theme: ThemeData( useMaterialDesign: true, brightness: Provider.of<TicTacToeThemeProvider>(context).mode, ), home: TicTacToeGame(), ), ), ); }
tic_tac_toe.dart
import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:tic_tac_toe/state/game_board.dart'; import 'package:tic_tac_toe/state/game_state.dart'; class TicTacToeGame extends StatefulWidget { @override State<TicTacToeGame> createState() => TicTacToeGameState(); } class TicTacToeGameState extends State<TicTacToeGame> with Ticker { GameBoard gameBoard = GameBoard(); int _mode = 1; @override Widget build(BuildContext context) { return ChangeNotifierProvider( builder: (context) => Consumer<TicTacToeGameState>( builder: (context, state) { return Scaffold( appBar: AppBar( title: Text('Tic Tac Toe'), ), body: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ GameBoardWidget( gameBoard: gameBoard, onMove: (x, y, player) { gameBoard.move(x, y, player); }, ), Padding( padding: const EdgeInsets.all(8.0), child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ Switch( value: _mode == 1, onChanged: (value) { setState(() { _mode = value ? 1 : 0; }); }, ), Text('Light Mode: ${_mode == 1 ? 'On' : 'Off'}) ], ), ), ], ), ); }, ), valueDelegates: [ TicTacToeGameValueDelegate(GameBoardWidget(gameBoard: gameBoard, onMove: (x, y, player) => gameBoard.move(x, y, player)), valueListenable: gameBoard), GameBoardValueDelegate(gameBoard), ], ); } }
game_board.dart
import 'dart:ui'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; class GameBoard extends ValueNotifier<List<List<Move>>> { List<List<Move>> board = List.generate(3, (i) => List.generate(3, (j) => Move.empty())); @override void dispose() { super.dispose(); } @override void notifyListeners() { super.notifyListeners(); } Move? move(int x, int y, Player player) { board[y][x] = Move(value: player.value, isMarked: true); return board[y][x]; } Move getCell(int x, int y) { return board[y][x]; } @override Widget build(BuildContext context) { return Consumer<GameBoard>( builder: (context, state) { return GridView.builder( gridDelegate: SliverWaterfallGridDelegate( crossAxisCount: 3, crossAxisSpacing: 8, crossAxisCount: 8, mainAxisCrossAxisSpacing: 8, ), children: List.generate(9, (i) => GridTileWidget(state.getCell(i % 3, (i - i % 3) ~/ 3))) ); }, ); } } class Move { int? value; bool? isMarked; Move({this.value, this.isMarked}); } class Player { int value; Player({this.value}); String get symbol => value == 1 ? 'X' : 'O'; }
game_state.dart
import 'package:flutter/material.dart'; class TicTacToeGameState extends State<TicTacToeGame> with Ticker { int? _mode; @override void didUpdateWidget() { setState(() { _mode = _mode == 1 ? 1 : 0; }); } bool get mode => _mode == 1; @override void didUpdateTheme() { super.didUpdateTheme(); } @override void didUpdateWidget() { super.didUpdateWidget(); } @override void deactivate() { super.deactivate(); } @override void dispose() { super.dispose(); } }
game_board_widget.dart
import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'game_board.dart'; import 'game_state.dart'; class GameBoardWidget extends StatefulWidget { final GameBoard gameBoard; final void Function(int, int, Player) onMove; GameBoardWidget({Key? key, required this.gameBoard, required this.onMove}) : super(key: key); @override Widget build(BuildContext context) { return Consumer<GameBoard>( builder: (context, state) { return GridView.builder( gridDelegate: SliverWaterfallGridDelegate( crossAxisCount: 3, crossAxisSpacing: 8, crossAxisCount: 8, mainAxisCrossAxisSpacing: 8, ), children: List.generate(9, (i) { if (state.getCell(i % 3, (i - i % 3) ~/ 3).isMarked) { return GridTileWidget(state.getCell(i % 3, (i - i % 3) ~/ 3).value == 1 ? 'X' : 'O'; } else { return GridTileWidget(''); } }), ); }, ); } }
The following are some example unit tests using the unittest package:
test/tic_tac_toe_test.dart
import 'package:flutter_test/flutter_test.dart'; import 'package:provider/provider.dart'; import 'package:tic_tac_toe/state/game_board.dart'; import 'package:tic_tac_toe/state/game_state.dart'; void main() { group('Test GameBoard', () { test('get empty cell', () { GameBoard gameBoard = GameBoard(); expect(gameBoard.getCell(1, 1).isMarked, isFalse); }); test('move on board', () { GameBoard gameBoard = GameBoard(); gameBoard.move(1, 1, Player(value: 1)); expect(gameBoard.getCell(1, 1).value, 1); expect(gameBoard.getCell(1, 1).isMarked, isTrue); }); }); group('Test GameBoardWidget', () { test('draw grid', () { GameBoardWidget widget = GameBoardWidget(gameBoard: GameBoard(), onMove: (x, y, player) {}); expect(widget.gameBoard.getCell(0, 0).isMarked, isFalse); widget.gameBoard.move(0, 0, Player(value: 1)); expect(widget.gameBoard.getCell(0, 0).value, 1); }); }); group('Test TicTacToeGameState', () { test('get mode', () { TicTacToeGameState state = TicTacToeGameState(); expect(state.mode, isTrue); }); }); }
test/main.dart
import 'package:flutter_test/flutter_test.dart'; import 'package:provider/provider.dart'; import 'package:tic_tac_toe/state/game_board.dart'; import 'package:tic_tac_toe/state/game_state.dart'; void main() { // Run the app runApp( MultiProvider( child: MaterialApp( title: 'Tic Tac Toe', theme: ThemeData( useMaterialDesign: true, brightness: Provider.of<TicTacToeGameState>(context).mode, ), home: TicTacToeGame(), ), ), ); // Run the tests group('Test the widgets', () { testWidgets('The game works', () { expect(findByType(TicTacToeGame()), isA<TicTacToeGame>()); expect(findByType(GameBoard()), isA<GameBoard>()); }); }); }
This codebase covers the entire implementation and testing of the tic tac toe game, including light and dark mode, with unit tests for the game board and game state.

Comments
Post a Comment