File tree 4 files changed +41
-5
lines changed
4 files changed +41
-5
lines changed Original file line number Diff line number Diff line change
1
+ module (
2
+ name = "gemma" ,
3
+ version = "0.1.0" ,
4
+ )
5
+
6
+ bazel_dep (
7
+ name = "rules_license" ,
8
+ version = "0.0.7" ,
9
+ )
10
+
11
+ bazel_dep (
12
+ name = "com_google_sentencepiece" ,
13
+ version = "0.1.96" ,
14
+ )
Original file line number Diff line number Diff line change
1
+ workspace (name = "gemma" )
2
+
3
+ load ("@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" )
4
+ load ("@bazel_tools//tools/build_defs/repo:utils.bzl" , "maybe" )
5
+
6
+ maybe (
7
+ http_archive ,
8
+ name = "rules_license" ,
9
+ sha256 = "4531deccb913639c30e5c7512a054d5d875698daeb75d8cf90f284375fe7c360" ,
10
+ urls = [
11
+ "https://github.com/bazelbuild/rules_license/releases/download/0.0.7/rules_license-0.0.7.tar.gz" ,
12
+ ],
13
+ )
14
+
15
+ maybe (
16
+ http_archive ,
17
+ name = "com_google_sentencepiece" ,
18
+ sha256 = "8409b0126ebd62b256c685d5757150cf7fcb2b92a2f2b98efb3f38fc36719754" ,
19
+ strip_prefix = "sentencepiece-0.1.96" ,
20
+ urls = ["https://github.com/google/sentencepiece/archive/refs/tags/v0.1.96.zip" ],
21
+ build_file = "@//third_party:sentencepiece.bazel" ,
22
+ patches = ["@//third_party:com_google_sentencepiece.patch" ],
23
+ patch_args = ["-p1" ],
24
+ )
Original file line number Diff line number Diff line change 62
62
#include " hwy/contrib/thread_pool/thread_pool.h"
63
63
// copybara:import_next_line:sentencepiece
64
64
#include " src/sentencepiece_processor.h"
65
- // #include "third_party/sentencepiece/src/util.h"
66
65
67
66
namespace gcpp {
68
67
@@ -205,8 +204,7 @@ struct Activations {
205
204
static constexpr size_t kQKVDim = TConfig::kQKVDim ;
206
205
static constexpr size_t kHeads = TConfig::kHeads ;
207
206
static constexpr size_t kKVHeads = TConfig::kKVHeads ;
208
- static constexpr size_t kCachePosSize =
209
- TConfig::kLayers * kKVHeads * kQKVDim ;
207
+ static constexpr size_t kCachePosSize = TConfig::kLayers * kKVHeads * kQKVDim ;
210
208
static constexpr size_t kCacheLayerSize = kKVHeads * kQKVDim ;
211
209
212
210
std::array<float , kBatchSize * kModelDim > x; // input
Original file line number Diff line number Diff line change 24
24
#include < string>
25
25
#include < vector>
26
26
27
- // copybara:import_next_line:gemma_cpp
28
- #include " configs.h" // kSeqLen
29
27
// copybara:import_next_line:gemma_cpp
30
28
#include " compression/compress.h" // SfpStream/NuqStream
31
29
// copybara:import_next_line:gemma_cpp
30
+ #include " configs.h" // kSeqLen
31
+ // copybara:import_next_line:gemma_cpp
32
32
#include " util/args.h" // ArgsBase
33
33
#include " hwy/aligned_allocator.h"
34
34
#include " hwy/base.h" // hwy::bfloat16_t
You can’t perform that action at this time.
0 commit comments