helloadhavan/github_issues huggingface dataset:
Repository: ggml-org/llama.cpp
Pull request: convert: text-only support for GLM-4.1V-9B-Thinking

Fix #14495

This is my first attempt to contribute to llama.cpp.

I used Transformers to compare layers with GLM-4-9B-0414, the text structure appears identical.
the config for GLM-4.1V-9B-Thinking is missing the head_dim field

```

llama-cli -ngl 99 -n 1024 -m /mnt/models3/git/GLM-4.1V-9B-Thinking/GLM-9B-4.1V-Thinking-F16.gguf -sys "speak in english" 2>/dev/null

speak in english
> write one sentence about llama.cpp
<think>Got it, let's think about what to write about llama.cpp. It's a popular open-source project for running large language models efficiently, maybe on GPUs or specialized hardware. So a sentence
(...)
```


Changed files:
filename: convert_hf_to_gguf.py
patch: @@ -6486,7 +6486,7 @@ def prepare_tensors(self):
         self.gguf_writer.add_max_alibi_bias(self.max_alibi_bias)
 
 
-@ModelBase.register("Glm4ForCausalLM")
+@ModelBase.register("Glm4ForCausalLM", "Glm4vForConditionalGeneration")
 class Glm4Model(TextModel):
     model_arch = gguf.MODEL_ARCH.GLM4
 
@@ -6508,14 +6508,22 @@ def set_vocab(self):
 
     def set_gguf_parameters(self):
         super().set_gguf_parameters()
-        rope_dim = self.hparams["head_dim"]
+        if (rope_dim := self.hparams.get("head_dim")) is None:
+            rope_dim = self.hparams["hidden_size"] // self.hparams["num_attention_heads"]
         self.gguf_writer.add_rope_dimension_count(int(rope_dim * self.hparams.get("partial_rotary_factor", 0.5)))
         rope_scaling = self.hparams.get("rope_scaling") or {}
         if rope_scaling.get("rope_type", rope_scaling.get("type")) == "yarn" and "factor" in rope_scaling:
             self.gguf_writer.add_rope_scaling_type(gguf.RopeScalingType.YARN)
             self.gguf_writer.add_rope_scaling_factor(rope_scaling["factor"])
             self.gguf_writer.add_rope_scaling_orig_ctx_len(rope_scaling["original_max_position_embeddings"])
 
+    def modify_tensors(self, data_torch: Tensor, name: str, bid: int | None) -> Iterable[tuple[str, Tensor]]:
+        if name.startswith("model.visual."): # ignore visual part of Glm4v
+            return []
+        elif name.startswith("model.language_model."):
+            name = name.replace("language_model.", "") # for Glm4v
+        return super().modify_tensors(data_torch, name, bid)
+
 
 @ModelBase.register("GlmForCausalLM", "ChatGLMModel", "ChatGLMForConditionalGeneration")
 class ChatGLMModel(TextModel):
Repository: denoland/deno
Pull request: fix(publish): error on missing name field

This PR improves the error output on publish when the `name` filed is missing:

```json
{
  "exports": "./mod.ts",
  "version": "0.0.1"
}
```

Before:

```sh
deno publish --dry-run
error: You did not specify an entrypoint in file:///Users/marvinh/dev/test/deno-pkg-timers/deno.json. Add `exports` mapping in the configuration file, eg:
{
  "name": "@scope/name",
  "version": "0.0.0",
  "exports": "<path_to_entrypoint>"
}
```

After:

```sh
deno publish --dry-run
error: Missing 'name' field in 'file:///Users/marvinh/dev/test/deno-pkg-timers/deno.json'.
```

Fixes https://github.com/denoland/deno/issues/27116

Changed files:
filename: cli/tools/registry/mod.rs
patch: @@ -97,11 +97,10 @@ pub async fn publish(
     match cli_options.start_dir.maybe_deno_json() {
       Some(deno_json) => {
         debug_assert!(!deno_json.is_package());
+        if deno_json.json.name.is_none() {
+          bail!("Missing 'name' field in '{}'.", deno_json.specifier);
+        }
         error_missing_exports_field(deno_json)?;
-        bail!(
-          "Missing 'name' or 'exports' field in '{}'.",
-          deno_json.specifier
-        );
       }
       None => {
         bail!(

filename: tests/specs/publish/missing_name/__test__.jsonc
patch: @@ -0,0 +1,5 @@
+{
+  "args": "publish --token 'sadfasdf'",
+  "output": "publish.out",
+  "exitCode": 1
+}

filename: tests/specs/publish/missing_name/deno.json
patch: @@ -0,0 +1,4 @@
+{
+  "version": "1.0.0",
+  "exports": "./mod.ts"
+}

filename: tests/specs/publish/missing_name/mod.ts
patch: @@ -0,0 +1,3 @@
+export function add(a: number, b: number): number {
+  return a + b;
+}

filename: tests/specs/publish/missing_name/publish.out
patch: @@ -0,0 +1 @@
+error: Missing 'name' field in 'file:///[WILDCARD]deno.json'.
Repository: ggml-org/llama.cpp
Pull request: metal : fix fusion across different encoders

fix #14835

Since in Metal we encode the graph in parallel using multiple `MTLComputeCommandEncoder`s, we have to prevent from fusing ops that are split in different encoders.

Changed files:
filename: ggml/src/ggml-metal/ggml-metal.m
patch: @@ -1955,6 +1955,7 @@ static bool ggml_metal_supports_op(const struct ggml_backend_metal_device_contex
 static int ggml_metal_encode_node(
                         ggml_backend_t   backend,
                                    int   idx,
+                                   int   idx_end,
           id<MTLComputeCommandEncoder>   encoder,
             struct ggml_metal_mem_pool * mem_pool) {
     struct ggml_backend_metal_context        * ctx     = backend->context;
@@ -2181,7 +2182,9 @@ static int ggml_metal_encode_node(
                     size_t offs_fuse;
                     id<MTLBuffer> id_fuse;
 
-                    for (n_fuse = 0; n_fuse <= 6; ++n_fuse) {
+                    // note: in metal, we sometimes encode the graph in parallel so we have to avoid fusing nodes
+                    //       across splits. idx_end indicates the last node in the current split
+                    for (n_fuse = 0; n_fuse <= 6 && idx + n_fuse + 1 < idx_end; ++n_fuse) {
                         if (!ggml_can_fuse(gf, idx + n_fuse, ops + n_fuse, 2)) {
                             break;
                         }
@@ -4288,7 +4291,7 @@ static int ggml_metal_encode_node(
                     ops[1] = GGML_OP_MUL;
                     ops[2] = GGML_OP_ADD;
 
-                    for (n_fuse = 0; n_fuse <= 1; ++n_fuse) {
+                    for (n_fuse = 0; n_fuse <= 1 && idx + n_fuse + 1 < idx_end; ++n_fuse) {
                         if (!ggml_can_fuse(gf, idx + n_fuse, ops + n_fuse, 2)) {
                             break;
                         }
@@ -6271,7 +6274,11 @@ static void ggml_backend_metal_set_n_cb(ggml_backend_t backend, int n_cb) {
                 [encoder pushDebugGroup:[NSString stringWithCString:ggml_op_desc(ggml_graph_node(ctx->gf, idx)) encoding:NSUTF8StringEncoding]];
             }
 
-            const int res = ggml_metal_encode_node(backend, idx, encoder, mem_pool);
+            const int res = ggml_metal_encode_node(backend, idx, node_end, encoder, mem_pool);
+            if (idx + res > node_end) {
+                GGML_ABORT("fusion error: nodes spanning multiple encoders have been fused. this indicates a bug in the fusion logic %s",
+                        "https://github.com/ggml-org/llama.cpp/pull/14849");
+            }
 
             if (should_capture) {
                 [encoder popDebugGroup];
Repository: vercel/next.js
Pull request: Fix race condition in `types-and-precompiled`

`ncc` will vendor packages into `src/compiled` which is also read during type-checking. We now run `ncc` after type-checking is completed to avoid this. type-checking is more important. That's why it comes first so that `ncc` doesn't shadow type issues. 

Ideally we run both and the use both exit codes but more complex to implement.

Fixes
```
error TS6053: File '/root/actions-runner/_work/next.js/next.js/packages/next/src/compiled/@edge-runtime/cookies/index.d.ts' not found.
...
```
-- https://github.com/vercel/next.js/actions/runs/15445231129/job/43472984624?pr=80111

Changed files:
filename: package.json
patch: @@ -44,7 +44,7 @@
     "lint-eslint": "cross-env ESLINT_USE_FLAT_CONFIG=false eslint . --ext js,jsx,mjs,ts,tsx,mts,mdx --config .eslintrc.json --no-eslintrc",
     "lint-ast-grep": "ast-grep scan",
     "lint-no-typescript": "run-p prettier-check lint-eslint lint-language",
-    "types-and-precompiled": "run-p lint-typescript check-precompiled check-compiler-fixtures types:test-lib",
+    "types-and-precompiled": "run-p lint-typescript check-compiler-fixtures types:test-lib && pnpm check-precompiled",
     "check-compiler-fixtures": "find crates/next-custom-transforms/tests/fixture -type f -name 'tsconfig.json' -print0 | xargs --null -n1 -I'{}' pnpm tsc --noEmit --project '{}'",
     "validate-externals-doc": "node ./scripts/validate-externals-doc.js",
     "lint": "run-p test-types lint-typescript prettier-check lint-eslint lint-ast-grep lint-language",
Repository: nodejs/node
Pull request: crypto: include `openssl/rand.h` explicitly

IWYU `#include` fix that also rectifies the following errors in Electron during build:

```
../../third_party/electron_node/deps/ncrypto/ncrypto.cc:308:14: error: use of undeclared identifier 'RAND_status'
  308 |     if (1 == RAND_status()) {
      |              ^
../../third_party/electron_node/deps/ncrypto/ncrypto.cc:314:39: error: use of undeclared identifier 'RAND_bytes'
  314 |       while (length > INT_MAX && 1 == RAND_bytes(buf, INT_MAX)) {
      |                                       ^
../../third_party/electron_node/deps/ncrypto/ncrypto.cc:318:37: error: use of undeclared identifier 'RAND_bytes'
  318 |       if (length <= INT_MAX && 1 == RAND_bytes(buf, static_cast<int>(length)))
      |                                     ^
../../third_party/electron_node/deps/ncrypto/ncrypto.cc:336:17: error: use of undeclared identifier 'RAND_poll'
  336 |   } while (1 == RAND_poll());
      |                 ^
4 errors generated.
```
<!--
Before submitting a pull request, please read:

- the CONTRIBUTING guide at https://github.com/nodejs/node/blob/HEAD/CONTRIBUTING.md
- the commit message formatting guidelines at
  https://github.com/nodejs/node/blob/HEAD/doc/contributing/pull-requests.md#commit-message-guidelines

For code changes:
1. Include tests for any bug fixes or new features.
2. Update documentation if relevant.
3. Ensure that `make -j4 test` (UNIX), or `vcbuild test` (Windows) passes.

If you believe this PR should be highlighted in the Node.js CHANGELOG
please add the `notable-change` label.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.
-->


Changed files:
filename: deps/ncrypto/ncrypto.cc
patch: @@ -5,6 +5,7 @@
 #include <openssl/bn.h>
 #include <openssl/evp.h>
 #include <openssl/hmac.h>
+#include <openssl/rand.h>
 #include <openssl/pkcs12.h>
 #include <openssl/x509v3.h>
 #if OPENSSL_VERSION_MAJOR >= 3
Repository: facebook/react
Pull request: Fix main


## Summary

Prettier was bumped recently. So any branch not including that bump, might bring in outdated formatting (e.g. https://github.com/facebook/react/pull/26068)

## How did you test this change?

- [x] `yarn prettier-all`


Changed files:
filename: packages/react-devtools-extensions/src/background.js
patch: @@ -29,7 +29,7 @@ if (!IS_FIREFOX) {
         world: chrome.scripting.ExecutionWorld.MAIN,
       },
     ],
-    function() {
+    function () {
       // When the content scripts are already registered, an error will be thrown.
       // It happens when the service worker process is incorrectly duplicated.
       if (chrome.runtime.lastError) {
Repository: denoland/deno
Pull request: fix(node/timers): error when passing id to clearTimeout/clearInterval

As pointed out in https://github.com/denoland/deno/issues/27126 we used a variable which could potentially be of type `number` instead of the `Timeout` class instance. Ensure that we're always setting `_destroyed` on the class instead instead.

Fixes https://github.com/denoland/deno/issues/27126

Changed files:
filename: ext/node/polyfills/timers.ts
patch: @@ -54,7 +54,7 @@ export function clearTimeout(timeout?: Timeout | number) {
   const id = +timeout;
   const timer = MapPrototypeGet(activeTimers, id);
   if (timer) {
-    timeout._destroyed = true;
+    timer._destroyed = true;
     MapPrototypeDelete(activeTimers, id);
   }
   clearTimeout_(id);
@@ -74,7 +74,7 @@ export function clearInterval(timeout?: Timeout | number | string) {
   const id = +timeout;
   const timer = MapPrototypeGet(activeTimers, id);
   if (timer) {
-    timeout._destroyed = true;
+    timer._destroyed = true;
     MapPrototypeDelete(activeTimers, id);
   }
   clearInterval_(id);

filename: tests/unit_node/timers_test.ts
patch: @@ -100,6 +100,16 @@ Deno.test("[node/timers refresh cancelled timer]", () => {
   p.refresh();
 });
 
+Deno.test("[node/timers] clearTimeout with number", () => {
+  const timer = +timers.setTimeout(() => fail(), 10);
+  timers.clearTimeout(timer);
+});
+
+Deno.test("[node/timers] clearInterval with number", () => {
+  const timer = +timers.setInterval(() => fail(), 10);
+  timers.clearInterval(timer);
+});
+
 Deno.test("[node/timers setImmediate returns Immediate object]", () => {
   const { clearImmediate, setImmediate } = timers;
Repository: ggml-org/llama.cpp
Pull request: sycl: fix undefined variable in work group size check

This PR fixes an issue where `work_group_size` was used without being defined in the SYCL work group size assertion.
The correct variable to use is `max_work_group_size`, which is properly initialized from `ggml_sycl_info()`.

Changed files:
filename: ggml/src/ggml-sycl/ggml-sycl.cpp
patch: @@ -3531,7 +3531,7 @@ static void ggml_sycl_mul_mat_id(ggml_backend_sycl_context & ctx,
                 stream->memset(dev_cur_src1_row.get(), 0, sizeof(int))));
 
             const unsigned int max_work_group_size = ggml_sycl_info().max_work_group_sizes[ctx.device];
-            assert(work_group_size % (WARP_SIZE * WARP_SIZE) == 0);
+            assert(max_work_group_size % (WARP_SIZE * WARP_SIZE) == 0);
 
             {
                 sycl::range<3> block_dims(1, 1, std::min((unsigned int)ne10, max_work_group_size));
Repository: vercel/next.js
Pull request: Turbopack: ignore module ids config in dev

`deterministic` doesn't work with HMR and causes odd errors.

So we'll ignore the `turbopack.moduleIds` config in dev

See https://vercel.slack.com/archives/C03EWR7LGEN/p1748971192561939 as well


Closes PACK-4779

Changed files:
filename: crates/next-api/src/project.rs
patch: @@ -1726,16 +1726,7 @@ impl Project {
     /// Gets the module id strategy for the project.
     #[turbo_tasks::function]
     pub async fn module_ids(self: Vc<Self>) -> Result<Vc<Box<dyn ModuleIdStrategy>>> {
-        let module_id_strategy =
-            if let Some(module_id_strategy) = &*self.next_config().module_ids().await? {
-                *module_id_strategy
-            } else {
-                match *self.next_mode().await? {
-                    NextMode::Development => ModuleIdStrategyConfig::Named,
-                    NextMode::Build => ModuleIdStrategyConfig::Deterministic,
-                }
-            };
-
+        let module_id_strategy = *self.next_config().module_ids(self.next_mode()).await?;
         match module_id_strategy {
             ModuleIdStrategyConfig::Named => Ok(Vc::upcast(DevModuleIdStrategy::new())),
             ModuleIdStrategyConfig::Deterministic => {

filename: crates/next-core/src/next_config.rs
patch: @@ -1559,11 +1559,17 @@ impl NextConfig {
     }
 
     #[turbo_tasks::function]
-    pub fn module_ids(&self) -> Vc<OptionModuleIds> {
-        let Some(module_ids) = self.turbopack.as_ref().and_then(|t| t.module_ids) else {
-            return Vc::cell(None);
-        };
-        Vc::cell(Some(module_ids))
+    pub async fn module_ids(&self, mode: Vc<NextMode>) -> Result<Vc<ModuleIds>> {
+        Ok(match *mode.await? {
+            // Ignore configuration in development mode, HMR only works with `named`
+            NextMode::Development => ModuleIds::Named.cell(),
+            NextMode::Build => self
+                .turbopack
+                .as_ref()
+                .and_then(|t| t.module_ids)
+                .unwrap_or(ModuleIds::Deterministic)
+                .cell(),
+        })
     }
 
     #[turbo_tasks::function]
Repository: ggml-org/llama.cpp
Pull request: CUDA: fix compilation with GGML_CUDA_F16

Fixes https://github.com/ggml-org/llama.cpp/issues/14834 .

Quite frankly we should be removing `GGML_CUDA_F16` and make decisions regarding whether or not to use FP16 arithmetic based on the hardware.

Changed files:
filename: ggml/src/ggml-cuda/convert.cu
patch: @@ -31,8 +31,8 @@ static __global__ void dequantize_block(const void * __restrict__ vx, dst_t * __
     dequantize_kernel(vx, ib, iqs, v);
 
     const int64_t iy0 = ((i03*ne02 + i02)*ne01 + i01)*ne00 + iybs + iqs;
-    y[iy0 + 0]        = v.x;
-    y[iy0 + y_offset] = v.y;
+    y[iy0 + 0]        = float(v.x);
+    y[iy0 + y_offset] = float(v.y);
 }
 
 template <bool need_check>
Repository: vercel/next.js
Pull request: Turbopack: Log persistent cache store time

### What?

Show info about the time it took to store the persistent cache

Closes PACK-4781

Changed files:
filename: turbopack/crates/turbo-tasks-backend/src/backend/mod.rs
patch: @@ -31,9 +31,11 @@ use turbo_tasks::{
         TransientTaskType, TurboTasksExecutionError, TypedCellContent,
     },
     event::{Event, EventListener},
+    message_queue::TimingEvent,
     registry::{self, get_value_type_global_name},
     task_statistics::TaskStatisticsApi,
     trace::TraceRawVcs,
+    turbo_tasks,
     util::IdFactoryWithReuse,
 };
 
@@ -812,6 +814,7 @@ impl<B: BackingStorage> TurboTasksBackendInner<B> {
     }
 
     fn snapshot(&self) -> Option<(Instant, bool)> {
+        let start = Instant::now();
         debug_assert!(self.should_persist());
         let mut snapshot_request = self.snapshot_request.lock();
         snapshot_request.snapshot_requested = true;
@@ -1043,6 +1046,14 @@ impl<B: BackingStorage> TurboTasksBackendInner<B> {
             }
         }
 
+        if new_items {
+            let elapsed = start.elapsed();
+            turbo_tasks().send_compilation_event(Arc::new(TimingEvent::new(
+                "Finished writing to persistent cache".to_string(),
+                elapsed,
+            )));
+        }
+
         Some((snapshot_time, new_items))
     }
Repository: huggingface/transformers
Pull request: Use torch 2.7.1 on daily CI

# What does this PR do?

I separate this from #37856 as that one is prepared 1 month ago + I would merge this PR on this Saturday evening instead.

Changed files:
filename: docker/transformers-all-latest-gpu/Dockerfile
patch: @@ -1,4 +1,4 @@
-FROM nvidia/cuda:12.1.0-cudnn8-devel-ubuntu22.04
+FROM nvidia/cuda:12.6.0-cudnn-devel-ubuntu22.04
 LABEL maintainer="Hugging Face"
 
 ARG DEBIAN_FRONTEND=noninteractive
@@ -9,9 +9,9 @@ SHELL ["sh", "-lc"]
 # The following `ARG` are mainly used to specify the versions explicitly & directly in this docker file, and not meant
 # to be used as arguments for docker build (so far).
 
-ARG PYTORCH='2.6.0'
+ARG PYTORCH='2.7.1'
 # Example: `cu102`, `cu113`, etc.
-ARG CUDA='cu121'
+ARG CUDA='cu126'
 # Disable kernel mapping for now until all tests pass
 ENV DISABLE_KERNEL_MAPPING=1
 

filename: docker/transformers-pytorch-deepspeed-latest-gpu/Dockerfile
patch: @@ -4,7 +4,7 @@ LABEL maintainer="Hugging Face"
 
 ARG DEBIAN_FRONTEND=noninteractive
 
-ARG PYTORCH='2.6.0'
+ARG PYTORCH='2.7.1'
 # Example: `cu102`, `cu113`, etc.
 ARG CUDA='cu126'
 

filename: docker/transformers-pytorch-gpu/Dockerfile
patch: @@ -1,4 +1,4 @@
-FROM nvidia/cuda:12.1.0-cudnn8-devel-ubuntu22.04
+FROM nvidia/cuda:12.6.0-cudnn-devel-ubuntu22.04
 LABEL maintainer="Hugging Face"
 
 ARG DEBIAN_FRONTEND=noninteractive
@@ -11,18 +11,20 @@ ARG REF=main
 RUN git clone https://github.com/huggingface/transformers && cd transformers && git checkout $REF
 
 # If set to nothing, will install the latest version
-ARG PYTORCH='2.6.0'
+ARG PYTORCH='2.7.1'
 ARG TORCH_VISION=''
 ARG TORCH_AUDIO=''
 # Example: `cu102`, `cu113`, etc.
-ARG CUDA='cu121'
+ARG CUDA='cu126'
 
+RUN python3 -m pip install --no-cache-dir -e ./transformers[dev-torch,testing,video]
+
+# Install torch stuff after ./transformers[dev-torch,testing,video], otherwise torch may be resolved to a previous
+# version.
 RUN [ ${#PYTORCH} -gt 0 ] && VERSION='torch=='$PYTORCH'.*' ||  VERSION='torch'; python3 -m pip install --no-cache-dir -U $VERSION --extra-index-url https://download.pytorch.org/whl/$CUDA
 RUN [ ${#TORCH_VISION} -gt 0 ] && VERSION='torchvision=='TORCH_VISION'.*' ||  VERSION='torchvision'; python3 -m pip install --no-cache-dir -U $VERSION --extra-index-url https://download.pytorch.org/whl/$CUDA
 RUN [ ${#TORCH_AUDIO} -gt 0 ] && VERSION='torchaudio=='TORCH_AUDIO'.*' ||  VERSION='torchaudio'; python3 -m pip install --no-cache-dir -U $VERSION --extra-index-url https://download.pytorch.org/whl/$CUDA
 
-RUN python3 -m pip install --no-cache-dir -e ./transformers[dev-torch,testing,video]
-
 RUN python3 -m pip uninstall -y tensorflow flax
 
 RUN python3 -m pip install --no-cache-dir git+https://github.com/facebookresearch/detectron2.git pytesseract