Skip to content

Commit

Permalink
Fix time reporting and added ref to justine.lol post
Browse files Browse the repository at this point in the history
  • Loading branch information
tjake committed Jun 24, 2024
1 parent 163308b commit a7cd386
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ public void generate(
}

long start = System.currentTimeMillis();
long promptStart = start;
// Batch Process Prompt
AbstractTensor last = batchForward(promptTokens, startPos, kvmem);

Expand Down Expand Up @@ -345,7 +346,7 @@ public void generate(
long end = System.currentTimeMillis();
System.out.printf(
"\n\nelapsed: %ds, prompt %.1fms per token, gen %.1fms per token\n",
TimeUnit.MILLISECONDS.toSeconds(end - start), batchMsPerToken, genMsPerToken);
TimeUnit.MILLISECONDS.toSeconds(end - promptStart), batchMsPerToken, genMsPerToken);
}
}
}
8 changes: 8 additions & 0 deletions jlama-native/src/main/c/vector_simd.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/**
* @file vector_simd.c
* @brief SIMD accelerated matrix multiplication
*
* SIMD accelerated matrix multiplication. Derived from the work of
* J. Tunney, ‘LLaMA Now Goes Faster on CPUs’, Mar. 2024. [Online].
* Available: https://justine.lol/matmul/. [Accessed: 29-Mar-2024].
*/
#include <stdio.h>
#if defined(__ARM_NEON__)
#include <arm_neon.h>
Expand Down
8 changes: 8 additions & 0 deletions jlama-native/src/main/c/vector_simd.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/**
* @file vector_simd.h
* @brief SIMD accelerated matrix multiplication
*
* SIMD accelerated matrix multiplication. Derived from the work of
* J. Tunney, ‘LLaMA Now Goes Faster on CPUs’, Mar. 2024. [Online].
* Available: https://justine.lol/matmul/. [Accessed: 29-Mar-2024].
*/
#ifndef DOT_H
#define DOT_H

Expand Down

0 comments on commit a7cd386

Please sign in to comment.