A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/stepango/llama2-kmp below:

stepango/llama2-kmp: Port of Andrej Karpathy's llama2.c to Kotlin Multiplatform.

This is the Kotlin Multiplatform implementation of Andrej Karpathy's llama2.c project.

Download one of the llama2 models

Example models used by llama2.c project

JVM:

./gradlew :jvmApp:run --args='stories15M.bin 0.9 512 "The little girl named Oxana"'

OSX:

./gradlew llama2:runDebugExecutableMacosX64 -PrunArgs="stories42M.bin 0.9 512 'The little girl named Oxana'"

Linux:

./gradlew llama2:runDebugExecutableLinuxX64 -PrunArgs="stories42M.bin 0.9 512 'The little girl named Oxana'"

Windows:

.\gradlew.bat llama2:runDebugExecutableMingwX64 -PrunArgs="stories15M.bin 0.9 512 'The little girl named Oxana'"

NodeJs:

./gradlew llama2:jsNodeRun -PrunArgs='stories15M.bin 0.9 512 "The little girl named Oxana"'

In addition to checkpoint, other parameters are also supported:

./gradlew :jvmApp:run --args='/path/to/model.bin 0.9 256 "One day, Lily met a Shoggoth"'

Parameter description:

Example output:

Once upon a time, there was a little girl named Lily. She loved to play outside in the sunshine. One day, she saw a big, red ball in the sky. It was the sun! She thought it was so pretty. Lily wanted to play with the ball, but it was too high up in the sky. She tried to jump and reach it, but she couldn't. Then, she had an idea. She would use a stick to knock the ball down. Lily found a stick and tried to hit the ball. But the stick was too short. She tried again and again, but she couldn't reach it. She felt sad. Suddenly, a kind man came by and saw Lily. He asked her what was wrong. Lily told him about the ball. The man smiled and said, "I have a useful idea!" He took out a long stick and used it to knock the ball down. Lily was so happy! She thanked the man and they played together in the sunshine.

Once upon a time, there was a little girl named Lily. She loved to play outside in the sunshine. One day, she saw a big, red

achieved tok/s: 68.054444

Project also contains original llama2.c code, which can be compiled and run with:

Windows:

.\gradlew llama2_c:build
llama2_c\build\exe\main\debug\llama2_c.exe stories15M.bin

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4