helloadhavan/github_issues huggingface dataset:
Repository: ggml-org/llama.cpp
Pull request: Replace freediskspace to free_disk_space in docker.yml

*Make sure to read the [contributing guidelines](https://github.com/ggml-org/llama.cpp/blob/master/CONTRIBUTING.md) before submitting a PR*

In my previous [PR](https://github.com/ggml-org/llama.cpp/pull/12839), I intended to enable the `Free Disk Space (Ubuntu)` step for `MUSA`. However, the step was still being skipped.

Upon closer look, I realized the issue was caused by a misconfigured key. This PR fixes that by updating the key to `free_disk_space` to ensure the step is properly activated.

Changed files:
filename: .github/workflows/docker.yml
patch: @@ -36,13 +36,13 @@ jobs:
       matrix:
         config:
           # Multi-stage build
-          - { tag: "cpu", dockerfile: ".devops/cpu.Dockerfile", platforms: "linux/amd64,linux/arm64", full: true, light: true, server: true, freediskspace: false}
-          - { tag: "cuda", dockerfile: ".devops/cuda.Dockerfile", platforms: "linux/amd64", full: true, light: true, server: true, freediskspace: false}
-          - { tag: "musa", dockerfile: ".devops/musa.Dockerfile", platforms: "linux/amd64", full: true, light: true, server: true, freediskspace: true}
-          - { tag: "intel", dockerfile: ".devops/intel.Dockerfile", platforms: "linux/amd64", full: true, light: true, server: true, freediskspace: false}
-          - { tag: "vulkan", dockerfile: ".devops/vulkan.Dockerfile", platforms: "linux/amd64", full: true, light: true, server: true, freediskspace: false}
+          - { tag: "cpu", dockerfile: ".devops/cpu.Dockerfile", platforms: "linux/amd64,linux/arm64", full: true, light: true, server: true, free_disk_space: false }
+          - { tag: "cuda", dockerfile: ".devops/cuda.Dockerfile", platforms: "linux/amd64", full: true, light: true, server: true, free_disk_space: false }
+          - { tag: "musa", dockerfile: ".devops/musa.Dockerfile", platforms: "linux/amd64", full: true, light: true, server: true, free_disk_space: true }
+          - { tag: "intel", dockerfile: ".devops/intel.Dockerfile", platforms: "linux/amd64", full: true, light: true, server: true, free_disk_space: false }
+          - { tag: "vulkan", dockerfile: ".devops/vulkan.Dockerfile", platforms: "linux/amd64", full: true, light: true, server: true, free_disk_space: false }
           # Note: the rocm images are failing due to a compiler error and are disabled until this is fixed to allow the workflow to complete
-          #- {tag: "rocm", dockerfile: ".devops/rocm.Dockerfile", platforms: "linux/amd64,linux/arm64", full: true, light: true, server: true, freediskspace: true }
+          #- {tag: "rocm", dockerfile: ".devops/rocm.Dockerfile", platforms: "linux/amd64,linux/arm64", full: true, light: true, server: true, free_disk_space: true }
     steps:
       - name: Check out the repo
         uses: actions/checkout@v4
Repository: vercel/next.js
Pull request: Turbopack: asset ident instead of chunk item ID in CSS

This is absolutely useless with numerical ids (prod build with `turbopackMinify: false`):
```css
/* 51318 */
.base2-module__zzC_ua__base {
  color: #ff0200;
}


/* 29244 */
.base2-scss-module-scss-module__JjfRsa__base {
  color: #ff0300;
}


/* 85234 */
.base-module__DNnTeq__base {
  color: red;
}


/* 29244 */
.base2-scss-module-scss-module__JjfRsa__base {
  color: #ff0300;
}
```

Closes PACK-4319

Changed files:
filename: turbopack/crates/turbopack-css/src/chunk/mod.rs
patch: @@ -89,7 +89,7 @@ impl CssChunk {
                 &*this.chunking_context.minify_type().await?,
                 MinifyType::NoMinify
             ) {
-                let id = &*css_item.id().await?;
+                let id = css_item.asset_ident().to_string().await?;
                 writeln!(body, "/* {} */", id)?;
             }
 

filename: turbopack/crates/turbopack-css/src/chunk/single_item_chunk/chunk.rs
patch: @@ -6,7 +6,7 @@ use turbo_tasks::{ResolvedVc, ValueToString, Vc};
 use turbo_tasks_fs::{rope::RopeBuilder, File, FileSystemPath};
 use turbopack_core::{
     asset::{Asset, AssetContent},
-    chunk::{Chunk, ChunkItem, ChunkItemExt, ChunkingContext, MinifyType},
+    chunk::{Chunk, ChunkItem, ChunkingContext, MinifyType},
     code_builder::{Code, CodeBuilder},
     ident::AssetIdent,
     introspect::Introspectable,
@@ -59,7 +59,7 @@ impl SingleItemCssChunk {
             &*this.chunking_context.minify_type().await?,
             MinifyType::NoMinify
         ) {
-            let id = this.item.id().await?;
+            let id = this.item.asset_ident().to_string().await?;
             writeln!(code, "/* {} */", id)?;
         }
         let content = this.item.content().await?;
Repository: huggingface/transformers
Pull request: fix tied weigths isuue 

# What does this PR do?

An update of #33913 before merge. That PR is approved by @ArthurZucker , but since then a huge refactorization is done by @Cyrilvallez, and I prefer to make sure the updated changes still looks fine for @Cyrilvallez .

In order to see the effect, run the following code snippet. On `main` it fails and on this PR it passes.

Fix #33689 and #33688


```python
import torch
from transformers import AutoModelForCausalLM

configs = [
    (torch.float32, False, "cpu"   ),  # fails
    #(torch.float16, True,  "cpu"   ),  # passes
    #(torch.float16, False, "cpu"   ),  # passes
    #(torch.float32, True,  "cpu"   ),  # passes
    #(torch.float32, False, "cpu"   ),  # fails
    #(torch.float32, False, "cuda:0"),  # passes
]

def test_model_save(torch_dtype, tie_word_embeddings, device_map, tmp_path="./"):
    model = AutoModelForCausalLM.from_pretrained(
        "Xenova/llama2.c-stories15M",
        torch_dtype=torch_dtype,
        tie_word_embeddings=tie_word_embeddings,
        device_map=device_map,
        revision="ccdd47c2dc554aeecd2bb4e713e1c988f206a296",
    )
    model.save_pretrained(tmp_path, safe_serialization=True)


for config in configs:
    test_model_save(*config)

```

Changed files:
filename: src/transformers/modeling_utils.py
patch: @@ -784,6 +784,9 @@ def _load_state_dict_into_meta_model(
     if is_meta_state_dict:
         file_pointer = safe_open(shard_file, framework="pt", device=tensor_device)
 
+    # Used to fix the issue mentioned in #37031: when loading a model with tied weights in state_dict + `tie_word_embeddings = False`,
+    # we need to make sure they are not loaded as tied weights!
+    data_ptrs = set()
     for param_name, empty_param in state_dict.items():
         if param_name not in expected_keys:
             continue
@@ -853,11 +856,19 @@ def _load_state_dict_into_meta_model(
                 if is_fsdp_enabled():
                     param_device = "cpu" if is_local_dist_rank_0() else "meta"
                 module, param_type = get_module_from_name(model, param_name)
+
+                # avoid tied weights
+                if param.data_ptr() in data_ptrs:
+                    param = param.clone()
+
                 module.load_state_dict(
                     {param_type: param.to(param_device)},
                     strict=False,
                     assign=True,
                 )
+
+                # Add `data_ptr` of `model.state_dict()[param_name]` to avoid tied weights
+                data_ptrs.add(model.state_dict()[param_name].data_ptr())
             else:
                 hf_quantizer.create_quantized_param(
                     model, param, param_name, param_device, state_dict, unexpected_keys
Repository: facebook/react
Pull request: [DevTools] Commands for internal builds all follow :fb convention

## Summary

The naming for our internal build commands for `react-devtools-core` follow the `:fb` convention, which I believe is more readable, so updating the command for the extensions as well.

This PR is paired with an internal diff to update the command name internally.

## Test Plan

- Internal sync script works with updated name

Changed files:
filename: packages/react-devtools-extensions/package.json
patch: @@ -6,12 +6,12 @@
     "build": "cross-env NODE_ENV=production yarn run build:chrome && yarn run build:firefox && yarn run build:edge",
     "build:dev": "cross-env NODE_ENV=development yarn run build:chrome:dev && yarn run build:firefox:dev && yarn run build:edge:dev",
     "build:chrome": "cross-env NODE_ENV=production node ./chrome/build",
-    "build:chrome:crx": "cross-env NODE_ENV=production FEATURE_FLAG_TARGET=extension-fb node ./chrome/build --crx",
+    "build:chrome:fb": "cross-env NODE_ENV=production FEATURE_FLAG_TARGET=extension-fb node ./chrome/build --crx",
     "build:chrome:dev": "cross-env NODE_ENV=development node ./chrome/build",
     "build:firefox": "cross-env NODE_ENV=production node ./firefox/build",
     "build:firefox:dev": "cross-env NODE_ENV=development node ./firefox/build",
     "build:edge": "cross-env NODE_ENV=production node ./edge/build",
-    "build:edge:crx": "cross-env NODE_ENV=production node ./edge/build --crx",
+    "build:edge:fb": "cross-env NODE_ENV=production FEATURE_FLAG_TARGET=extension-fb node ./edge/build --crx",
     "build:edge:dev": "cross-env NODE_ENV=development node ./edge/build",
     "test:chrome": "node ./chrome/test",
     "test:firefox": "node ./firefox/test",
Repository: electron/electron
Pull request: build: update appveyor image to latest version

This PR updates appveyor.yml to the latest baked image, e-129.0.6656.0.

Notes: none

Changed files:
filename: appveyor-woa.yml
patch: @@ -29,7 +29,7 @@
 
 version: 1.0.{build}
 build_cloud: electronhq-16-core
-image: e-129.0.6654.0
+image: e-129.0.6656.0
 environment:
   GIT_CACHE_PATH: C:\Users\appveyor\libcc_cache
   ELECTRON_OUT_DIR: Default

filename: appveyor.yml
patch: @@ -29,7 +29,7 @@
 
 version: 1.0.{build}
 build_cloud: electronhq-16-core
-image: e-129.0.6654.0
+image: e-129.0.6656.0
 environment:
   GIT_CACHE_PATH: C:\Users\appveyor\libcc_cache
   ELECTRON_OUT_DIR: Default
Repository: denoland/deno
Pull request: fix(ext/node): use primordials in `ext/node/polyfills/_fs/_fs_cp.js`

Towards #24236

Changed files:
filename: ext/node/polyfills/_fs/_fs_cp.js
patch: @@ -1,15 +1,14 @@
 // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
-
-// deno-lint-ignore-file prefer-primordials
-
+import { primordials } from "ext:core/mod.js";
 import { op_node_cp, op_node_cp_sync } from "ext:core/ops";
-
 import {
   getValidatedPath,
   validateCpOptions,
 } from "ext:deno_node/internal/fs/utils.mjs";
 import { promisify } from "ext:deno_node/internal/util.mjs";
 
+const { PromisePrototypeThen } = primordials;
+
 export function cpSync(src, dest, options) {
   validateCpOptions(options);
   const srcPath = getValidatedPath(src, "src");
@@ -27,10 +26,11 @@ export function cp(src, dest, options, callback) {
   const srcPath = getValidatedPath(src, "src");
   const destPath = getValidatedPath(dest, "dest");
 
-  op_node_cp(
-    srcPath,
-    destPath,
-  ).then(
+  PromisePrototypeThen(
+    op_node_cp(
+      srcPath,
+      destPath,
+    ),
     (res) => callback(null, res),
     (err) => callback(err, null),
   );
Repository: vercel/next.js
Pull request: test: attempt to unflake useLinkStatus interrupted navigation test

This test flaked for me here: https://github.com/vercel/next.js/actions/runs/14353556171/job/40239845657#step:33:678

I suspect this is because \[the assertion that the pending state should disappear\] sometimes runs too soon.
To fix this, I made it wait until the side-effect of clicking the "debug mode" button becomes visible before checking if the pending state is gone. If the test is still flaky after this, it indicates a bug in `useLinkStatus`, because the pending state is still hanging around for some reason.

(i chose not to just wrap the assertion in a `retry()`, because we want to ensure that the indicator disappears immediately, not at some unspecified point in the future)


Changed files:
filename: test/e2e/use-link-status/index.test.ts
patch: @@ -1,5 +1,5 @@
 import { nextTestSetup } from 'e2e-utils'
-import { waitFor } from 'next-test-utils'
+import { retry, waitFor } from 'next-test-utils'
 
 describe('useLinkStatus', () => {
   const { next } = nextTestSetup({
@@ -39,6 +39,13 @@ describe('useLinkStatus', () => {
     // Trigger shallow routing by clicking debug mode button
     await browser.elementById('enable-debug-btn').click()
 
+    // Wait for the new render to commit to make sure that the navigation transition is interrupted
+    await retry(async () => {
+      expect(
+        await browser.elementByCss('[data-testid="debug-mode"]').text()
+      ).toBe('Debug Mode Enabled')
+    })
+
     // Pending state should be gone
     const post1LoadingElements = await browser.elementsByCss('#post-1-loading')
     expect(post1LoadingElements.length).toBe(0)
Repository: ggml-org/llama.cpp
Pull request: llama : correct rms norm for llama 4

Adapt to match this commit in transformers library: https://github.com/huggingface/transformers/commit/10144ff116497878d1d82aabf0a84c16944786f1

Thanks @danielhanchen and @ArthurZucker for noticing this

Changed files:
filename: src/llama-model.cpp
patch: @@ -4440,8 +4440,8 @@ struct llm_build_llama : public llm_graph_context {
 
                 if (arch == LLM_ARCH_LLAMA4 && use_rope && hparams.use_kq_norm) {
                     // Llama4TextL2Norm
-                    Qcur = ggml_rms_norm(ctx0, Qcur, 1e-6);
-                    Kcur = ggml_rms_norm(ctx0, Kcur, 1e-6);
+                    Qcur = ggml_rms_norm(ctx0, Qcur, hparams.f_norm_rms_eps);
+                    Kcur = ggml_rms_norm(ctx0, Kcur, hparams.f_norm_rms_eps);
                     cb(Qcur, "Qcur_normed", il);
                     cb(Kcur, "Kcur_normed", il);
                 }
Repository: facebook/react
Pull request: Release pooled cache reference in complete/unwind

## Summary

The pooled Cache instance is conceptually _moved_ to the root on complete or unwind. However currently we don't reset the reference back to null, instead relying on pushRootCachePool to update it when the next render begins/resumes. This PR explicitly sets the cache back to null and updates the comments to clarify that conceptually `popCacheRootPool()` is moving ownership. This doesn't change much but maybe gives GC a chance to free the data a tad earlier.

## How did you test this change?

`yarn test` and `yarn test --prod`

Changed files:
filename: packages/react-reconciler/src/ReactFiberCacheComponent.new.js
patch: @@ -99,14 +99,16 @@ export function popRootCachePool(root: FiberRoot, renderLanes: Lanes) {
     return;
   }
   // The `pooledCache` variable points to the cache that was used for new
-  // cache boundaries during this render, if any. Stash it on the root so that
-  // parallel transitions may share the same cache. We will clear this field
-  // once all the transitions that depend on it (which we track with
-  // `pooledCacheLanes`) have committed.
+  // cache boundaries during this render, if any. Move ownership of the
+  // cache to the root so that parallel transitions may share the same
+  // cache. We will clear this field once all the transitions that depend
+  // on it (which we track with `pooledCacheLanes`) have committed.
   root.pooledCache = pooledCache;
   if (pooledCache !== null) {
     root.pooledCacheLanes |= renderLanes;
   }
+  // set to null, conceptually we are moving ownership to the root
+  pooledCache = null;
 }
 
 export function restoreSpawnedCachePool(

filename: packages/react-reconciler/src/ReactFiberCacheComponent.old.js
patch: @@ -99,14 +99,16 @@ export function popRootCachePool(root: FiberRoot, renderLanes: Lanes) {
     return;
   }
   // The `pooledCache` variable points to the cache that was used for new
-  // cache boundaries during this render, if any. Stash it on the root so that
-  // parallel transitions may share the same cache. We will clear this field
-  // once all the transitions that depend on it (which we track with
-  // `pooledCacheLanes`) have committed.
+  // cache boundaries during this render, if any. Move ownership of the
+  // cache to the root so that parallel transitions may share the same
+  // cache. We will clear this field once all the transitions that depend
+  // on it (which we track with `pooledCacheLanes`) have committed.
   root.pooledCache = pooledCache;
   if (pooledCache !== null) {
     root.pooledCacheLanes |= renderLanes;
   }
+  // set to null, conceptually we are moving ownership to the root
+  pooledCache = null;
 }
 
 export function restoreSpawnedCachePool(
Repository: denoland/deno
Pull request: fix(ext/node): use primordials in `ext/node/polyfills/timers.ts`

Towards #24236

Changed files:
filename: ext/node/polyfills/timers.ts
patch: @@ -1,12 +1,12 @@
 // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
 
-// TODO(petamoriken): enable prefer-primordials for node polyfills
-// deno-lint-ignore-file prefer-primordials
-
 import { primordials } from "ext:core/mod.js";
 const {
   MapPrototypeGet,
   MapPrototypeDelete,
+  ObjectDefineProperty,
+  Promise,
+  SafeArrayIterator,
 } = primordials;
 
 import {
@@ -32,9 +32,11 @@ export function setTimeout(
   return new Timeout(callback, timeout, args, false, true);
 }
 
-Object.defineProperty(setTimeout, promisify.custom, {
+ObjectDefineProperty(setTimeout, promisify.custom, {
   value: (timeout: number, ...args: unknown[]) => {
-    return new Promise((cb) => setTimeout(cb, timeout, ...args));
+    return new Promise((cb) =>
+      setTimeout(cb, timeout, ...new SafeArrayIterator(args))
+    );
   },
   enumerable: true,
 });
@@ -74,7 +76,7 @@ export function setImmediate(
   cb: (...args: unknown[]) => void,
   ...args: unknown[]
 ): Timeout {
-  return new Immediate(cb, ...args);
+  return new Immediate(cb, ...new SafeArrayIterator(args));
 }
 export function clearImmediate(immediate: Immediate) {
   if (immediate == null) {
Repository: huggingface/transformers
Pull request: Allow flexible generation params arg when checking pipeline specs

We currently check the input and output signatures of our Pipeline classes against the specs in `huggingface_hub`, but this makes it hard for the Hub to change without breaking our CI. This PR allows them to change their spec from `generate_kwargs` to `generation_parameters` without causing failures at our end.

Changed files:
filename: tests/test_pipeline_mixin.py
patch: @@ -930,23 +930,32 @@ def parse_args_from_docstring_by_indentation(docstring):
 
 
 def compare_pipeline_args_to_hub_spec(pipeline_class, hub_spec):
+    """
+    Compares the docstring of a pipeline class to the fields of the matching Hub input signature class to ensure that
+    they match. This guarantees that Transformers pipelines can be used in inference without needing to manually
+    refactor or rename inputs.
+    """
     ALLOWED_TRANSFORMERS_ONLY_ARGS = ["timeout"]
 
     docstring = inspect.getdoc(pipeline_class.__call__).strip()
     docstring_args = set(parse_args_from_docstring_by_indentation(docstring))
     hub_args = set(get_arg_names_from_hub_spec(hub_spec))
 
     # Special casing: We allow the name of this arg to differ
-    js_generate_args = [js_arg for js_arg in hub_args if js_arg.startswith("generate")]
+    hub_generate_args = [
+        hub_arg for hub_arg in hub_args if hub_arg.startswith("generate") or hub_arg.startswith("generation")
+    ]
     docstring_generate_args = [
-        docstring_arg for docstring_arg in docstring_args if docstring_arg.startswith("generate")
+        docstring_arg
+        for docstring_arg in docstring_args
+        if docstring_arg.startswith("generate") or docstring_arg.startswith("generation")
     ]
     if (
-        len(js_generate_args) == 1
+        len(hub_generate_args) == 1
         and len(docstring_generate_args) == 1
-        and js_generate_args != docstring_generate_args
+        and hub_generate_args != docstring_generate_args
     ):
-        hub_args.remove(js_generate_args[0])
+        hub_args.remove(hub_generate_args[0])
         docstring_args.remove(docstring_generate_args[0])
 
     # Special casing 2: We permit some transformers-only arguments that don't affect pipeline output
Repository: ggml-org/llama.cpp
Pull request: ggml: fixes #12846 compilation error

Fixes the compilation error introduced in 995083e4ed24933e6a289472f9de0f0b53ca5eca for s390x platform. Please refer to #12846 for more information.

cc: @AlekseiNikiforovIBM 

Changed files:
filename: ggml/src/ggml-cpu/simd-mappings.h
patch: @@ -855,13 +855,17 @@ static inline __vector float __lzs_f16cx4_load(const ggml_fp16_t * x) {
         tmp[i] = GGML_FP16_TO_FP32(x[i]);
     }
 
-    return vec_xl(0, tmp);
+    // note: keep type-cast here to prevent compiler bugs
+    // see: https://github.com/ggml-org/llama.cpp/issues/12846
+    return vec_xl(0, (const float *)(tmp));
 }
 
 static inline void __lzs_f16cx4_store(ggml_fp16_t * x, __vector float y) {
     float arr[4];
 
-    vec_xst(y, 0, arr);
+    // note: keep type-cast here to prevent compiler bugs
+    // see: https://github.com/ggml-org/llama.cpp/issues/12846
+    vec_xst(y, 0, (float *)(arr));
 
     for (int i = 0; i < 4; i++) {
         x[i] = GGML_FP32_TO_FP16(arr[i]);
Repository: ggml-org/llama.cpp
Pull request: devops: add intel oneapi dockerfile

After some testing, I found out this configuration that give the best performance on Intel CPU.

See this issue for more details: https://github.com/ggerganov/llama.cpp/issues/5067

Changed files:
filename: .devops/main-intel.Dockerfile
patch: @@ -0,0 +1,26 @@
+ARG ONEAPI_VERSION=2024.0.1-devel-ubuntu22.04
+ARG UBUNTU_VERSION=22.04
+
+FROM intel/hpckit:$ONEAPI_VERSION as build
+
+RUN apt-get update && \
+    apt-get install -y git
+
+WORKDIR /app
+
+COPY . .
+
+# for some reasons, "-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=Intel10_64lp -DLLAMA_NATIVE=ON" give worse performance
+RUN mkdir build && \
+    cd build && \
+    cmake .. -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx && \
+    cmake --build . --config Release --target main server
+
+FROM ubuntu:$UBUNTU_VERSION as runtime
+
+COPY --from=build /app/build/bin/main /main
+COPY --from=build /app/build/bin/server /server
+
+ENV LC_ALL=C.utf8
+
+ENTRYPOINT [ "/main" ]

filename: .github/workflows/docker.yml
patch: @@ -35,6 +35,7 @@ jobs:
           - { tag: "full-cuda", dockerfile: ".devops/full-cuda.Dockerfile", platforms: "linux/amd64" }
           - { tag: "light-rocm", dockerfile: ".devops/main-rocm.Dockerfile", platforms: "linux/amd64,linux/arm64" }
           - { tag: "full-rocm", dockerfile: ".devops/full-rocm.Dockerfile", platforms: "linux/amd64,linux/arm64" }
+          - { tag: "light-intel", dockerfile: ".devops/main-intel.Dockerfile", platforms: "linux/amd64" }
     steps:
       - name: Check out the repo
         uses: actions/checkout@v3

filename: CMakeLists.txt
patch: @@ -478,6 +478,11 @@ function(get_flags CCID CCVER)
         if (CCVER VERSION_GREATER_EQUAL 8.1.0)
             set(CXX_FLAGS ${CXX_FLAGS} -Wextra-semi)
         endif()
+    elseif (CCID MATCHES "Intel")
+        # enable max optimization level when using Intel compiler
+        set(C_FLAGS   -ipo -O3 -static -fp-model=fast -flto -fno-stack-protector)
+        set(CXX_FLAGS -ipo -O3 -static -fp-model=fast -flto -fno-stack-protector)
+        add_link_options(-fuse-ld=lld -static-intel)
     endif()
 
     set(GF_C_FLAGS   ${C_FLAGS}   PARENT_SCOPE)