Skip to content

Commit c90ed9f

Browse files
Fix editorconfig formatting
1 parent 7a279fe commit c90ed9f

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

convert-persimmon-to-gguf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def _flatten_dict(dct, tensors, prefix=None):
2424
def _get_sentencepiece_tokenizer_info(dir_model: Path):
2525
tokenizer_path = dir_model / 'adept_vocab.model'
2626
print('gguf: getting sentencepiece tokenizer from', tokenizer_path)
27-
tokenizer = SentencePieceProcessor(str(tokenizer_path))
27+
tokenizer = SentencePieceProcessor(str(tokenizer_path))
2828
print('gguf: adding tokens')
2929
tokens: list[bytes] = []
3030
scores: list[float] = []
@@ -70,7 +70,7 @@ def main():
7070

7171
arch = gguf.MODEL_ARCH.PERSIMMON
7272
gguf_writer = gguf.GGUFWriter(args.outfile, gguf.MODEL_ARCH_NAMES[arch])
73-
73+
7474
block_count = hparams.num_layers
7575
head_count = hparams.num_attention_heads
7676
head_count_kv = head_count
@@ -127,4 +127,4 @@ def main():
127127

128128

129129
if __name__ == '__main__':
130-
main()
130+
main()

ggml-metal.metal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1129,7 +1129,7 @@ kernel void kernel_concat(
11291129
uint3 tgpig[[threadgroup_position_in_grid]],
11301130
uint3 tpitg[[thread_position_in_threadgroup]],
11311131
uint3 ntg[[threads_per_threadgroup]]) {
1132-
1132+
11331133
const int64_t i03 = tgpig.z;
11341134
const int64_t i02 = tgpig.y;
11351135
const int64_t i01 = tgpig.x;

llama.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2476,7 +2476,7 @@ static void llm_load_tensors(
24762476
}
24772477
} break;
24782478
case LLM_ARCH_PERSIMMON:
2479-
{
2479+
{
24802480
model.tok_embeddings = ml.create_tensor(ctx, tn(LLM_TENSOR_TOKEN_EMBD, "weight"), {n_embd, n_vocab}, GGML_BACKEND_CPU);
24812481
model.output_norm = ml.create_tensor(ctx, tn(LLM_TENSOR_OUTPUT_NORM, "weight"), {n_embd}, GGML_BACKEND_CPU);
24822482
model.output_norm_b = ml.create_tensor(ctx, tn(LLM_TENSOR_OUTPUT_NORM, "bias"), {n_embd}, GGML_BACKEND_CPU);
@@ -4162,8 +4162,8 @@ static struct ggml_cgraph * llm_build_persimmon(
41624162
cur = ggml_add(ctx0, cur, model.layers[il].attn_norm_b);
41634163
offload_func(cur);
41644164
ggml_format_name(cur, "input_layernorm_%d", il);
4165-
}
4166-
// self attention
4165+
}
4166+
// self attention
41674167
{
41684168
cur = ggml_mul_mat(ctx0, model.layers[il].wqkv, cur);
41694169
offload_func_kq(cur);
@@ -4206,7 +4206,7 @@ static struct ggml_cgraph * llm_build_persimmon(
42064206
offload_func_v(tmpk);
42074207
tmpk = ggml_add(ctx0, tmpk, model.layers[il].attn_k_norm_b);
42084208
offload_func_v(tmpk);
4209-
4209+
42104210
// RoPE the first n_rot of q/k, pass the other half, and concat.
42114211
struct ggml_tensor * qrot = ggml_view_3d(
42124212
ctx0, tmpq, n_rot, n_head, n_tokens,
@@ -4227,7 +4227,7 @@ static struct ggml_cgraph * llm_build_persimmon(
42274227

42284228
// get the second half of tmpq, e.g tmpq[n_rot:, :, :]
42294229
struct ggml_tensor * qpass = ggml_view_3d(
4230-
ctx0, tmpq, n_rot, n_head, n_tokens,
4230+
ctx0, tmpq, n_rot, n_head, n_tokens,
42314231
ggml_element_size(tmpq) * n_embd_head,
42324232
ggml_element_size(tmpq) * n_embd_head * n_head,
42334233
ggml_element_size(tmpq) * n_rot
@@ -4328,9 +4328,9 @@ static struct ggml_cgraph * llm_build_persimmon(
43284328
offload_func_kq(KQ_soft_max);
43294329
ggml_set_name(KQ_soft_max, "KQ_soft_max");
43304330

4331-
struct ggml_tensor * V =
4331+
struct ggml_tensor * V =
43324332
ggml_view_3d(ctx0, kv_self.v,
4333-
n_kv, n_embd_head, n_head_kv,
4333+
n_kv, n_embd_head, n_head_kv,
43344334
ggml_element_size(kv_self.v)*n_ctx,
43354335
ggml_element_size(kv_self.v)*n_ctx*n_embd_head,
43364336
ggml_element_size(kv_self.v)*n_ctx*n_embd_gqa*il);
@@ -4361,11 +4361,11 @@ static struct ggml_cgraph * llm_build_persimmon(
43614361
ggml_set_name(inpFF, "inpFF");
43624362
{
43634363
// MLP
4364-
{
4364+
{
43654365
// Norm
43664366
cur = ggml_norm(ctx0, inpFF, norm_eps);
43674367
offload_func(cur);
4368-
cur = ggml_add(ctx0,
4368+
cur = ggml_add(ctx0,
43694369
ggml_mul(ctx0, cur, model.layers[il].ffn_norm),
43704370
model.layers[il].ffn_norm_b
43714371
);
@@ -4386,7 +4386,7 @@ static struct ggml_cgraph * llm_build_persimmon(
43864386

43874387
cur = ggml_mul_mat(ctx0, model.layers[il].w2, cur);
43884388
offload_func(cur);
4389-
cur = ggml_add(ctx0,
4389+
cur = ggml_add(ctx0,
43904390
cur,
43914391
model.layers[il].b2);
43924392
offload_func(cur);

0 commit comments

Comments
 (0)