Skip to content

Commit 9149f39

Browse files
committed
Merge branch 'master' into xsn/server_mtmd
2 parents a0f2562 + 5215b91 commit 9149f39

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

convert_hf_to_gguf.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -5686,7 +5686,12 @@ def set_gguf_parameters(self):
56865686
rope_dim = hparams.get("head_dim") or hparams["hidden_size"] // hparams["num_attention_heads"]
56875687

56885688
self.gguf_writer.add_rope_dimension_count(rope_dim)
5689-
self.gguf_writer.add_rope_scaling_type(gguf.RopeScalingType.NONE)
5689+
if (self.hparams.get("rope_scaling") or {}).get("type") == "yarn" and "factor" in self.hparams["rope_scaling"]:
5690+
self.gguf_writer.add_rope_scaling_type(gguf.RopeScalingType.YARN)
5691+
self.gguf_writer.add_rope_scaling_factor(self.hparams["rope_scaling"]["factor"])
5692+
self.gguf_writer.add_rope_scaling_orig_ctx_len(self.hparams["rope_scaling"]["original_max_position_embeddings"])
5693+
else:
5694+
self.gguf_writer.add_rope_scaling_type(gguf.RopeScalingType.NONE)
56905695
self.gguf_writer.add_leading_dense_block_count(hparams["first_k_dense_replace"])
56915696
self.gguf_writer.add_vocab_size(hparams["vocab_size"])
56925697
self.gguf_writer.add_expert_feed_forward_length(hparams["moe_intermediate_size"])

ggml/src/ggml-sycl/ggml-sycl.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -3873,6 +3873,9 @@ static bool ggml_backend_sycl_device_supports_op(ggml_backend_dev_t dev, const g
38733873
if (a->ne[3] != b->ne[3]) {
38743874
return false;
38753875
}
3876+
if (!ggml_is_contiguous(b)) {
3877+
return false;
3878+
}
38763879
ggml_type a_type = a->type;
38773880
if (a_type == GGML_TYPE_IQ4_NL || a_type == GGML_TYPE_IQ4_XS ||
38783881
a_type == GGML_TYPE_IQ3_XXS || a_type == GGML_TYPE_IQ3_S ||

0 commit comments

Comments
 (0)