helloadhavan/github_issues huggingface dataset:
Repository: huggingface/transformers
Pull request: fix(models): Migrate legacy segmentation_indices to out_indices in BeitConfig

### What does this PR do?

→ Add backward compat for legacy `segmentation_indices` field in `BeitConfig`.
→ Fix the conversion script to set `out_indices` for base models; should the model checkpoints be re-exported after this PR.
→ Improve validation error messages to catch missing `out_indices` and display clearer errors.

Fixes #43504.

### Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [ ] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
      Pull Request section?
- [x] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [x] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?

Changed files:
filename: src/transformers/models/beit/configuration_beit.py
patch: @@ -151,6 +151,8 @@ def __init__(
         reshape_hidden_states=True,
         **kwargs,
     ):
+        if "segmentation_indices" in kwargs and out_indices is None:
+            out_indices = kwargs.pop("segmentation_indices")
         super().__init__(**kwargs)
 
         self.vocab_size = vocab_size

filename: src/transformers/models/beit/convert_beit_unilm_to_pytorch.py
patch: @@ -226,7 +226,8 @@ def convert_beit_checkpoint(checkpoint_url, pytorch_dump_folder_path):
 
     # size of the architecture
     if "base" in checkpoint_url:
-        pass
+        if "ade20k" in checkpoint_url:
+            config.out_indices = [3, 5, 7, 11]
     elif "large" in checkpoint_url:
         config.hidden_size = 1024
         config.intermediate_size = 4096
Repository: ollama/ollama
Pull request: ci: place rocm windows in correct runner dir


Changed files:
filename: .github/workflows/release.yaml
patch: @@ -94,7 +94,7 @@ jobs:
             install: https://download.amd.com/developer/eula/rocm-hub/AMD-Software-PRO-Edition-24.Q4-WinSvr2022-For-HIP.exe
             rocm-version: '6.2'
             flags: '-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS="-parallel-jobs=4 -Wno-ignored-attributes -Wno-deprecated-pragma" -DCMAKE_CXX_FLAGS="-parallel-jobs=4 -Wno-ignored-attributes -Wno-deprecated-pragma"'
-            runner_dir: ''
+            runner_dir: 'rocm'
     runs-on: ${{ matrix.arch == 'arm64' && format('{0}-{1}', matrix.os, matrix.arch) || matrix.os }}
     environment: release
     env:
Repository: electron/electron
Pull request: fix: delete temporary blink* globals after restoring Blink implementations

Backport of #49991.

See that PR for details.

Notes: no-notes

Changed files:
filename: lib/node/init.ts
patch: @@ -9,6 +9,7 @@ if ((globalThis as any).blinkfetch) {
   const keys = ['fetch', 'Response', 'FormData', 'Request', 'Headers', 'EventSource'];
   for (const key of keys) {
     (globalThis as any)[key] = (globalThis as any)[`blink${key}`];
+    delete (globalThis as any)[`blink${key}`];
   }
 }
 

filename: lib/worker/init.ts
patch: @@ -22,6 +22,7 @@ if ((globalThis as any).blinkfetch) {
   const keys = ['fetch', 'Response', 'FormData', 'Request', 'Headers', 'EventSource'];
   for (const key of keys) {
     (globalThis as any)[key] = (globalThis as any)[`blink${key}`];
+    delete (globalThis as any)[`blink${key}`];
   }
 }
Repository: ollama/ollama
Pull request: CI: workaround broken clang on windows temporarily

It looks like mingw-w64-clang-x86_64-clang 21.1.1-1 is broken for CGO compiles on windows right now, but I haven't found a way to install v20 + gcc-compat which we need.  To unblock the build, we'll switch back to the default compiler (gcc) which likely breaks unicode handling on windows due to known bugs in the c++ library.  Assuming that's confirmed, we'll need a different fix for CI before we finalize 0.12.4.

CI from a few days ago worked fine with clang 20.1.8-2


Changed files:
filename: .github/workflows/release.yaml
patch: @@ -186,7 +186,8 @@ jobs:
         if: matrix.arch == 'amd64'
         run: |
           $ErrorActionPreference = "Stop"
-          Start-Process "C:\msys64\usr\bin\pacman.exe" -ArgumentList @("-S", "--noconfirm", "mingw-w64-clang-x86_64-gcc-compat", "mingw-w64-clang-x86_64-clang") -NoNewWindow -Wait
+          # TODO mingw-w64-clang-x86_64-clang v21 is currently broken for cgo build, but v20 + gcc-compat isn't available
+          # Start-Process "C:\msys64\usr\bin\pacman.exe" -ArgumentList @("-S", "--noconfirm", "mingw-w64-clang-x86_64-gcc-compat", "mingw-w64-clang-x86_64-clang") -NoNewWindow -Wait
           echo "C:\msys64\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
           echo "C:\msys64\clang64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
       - name: Install ARM64 system dependencies
Repository: facebook/react
Pull request: [DevTools] Use the scrollWidth/Height for the root when the root is the documentElement

If I can scroll the document due to it overflowing, I should be able to scroll the suspense tab as much. The real rect for the root when it's the document is really the full scroll height.

This doesn't fully eliminate the need to do recursive bounding boxes for the root since it's still possible to have the rects overflow. E.g. if they're currently resuspended or inside nested scrolls.

~However, maybe we should have the actual paintable root rect just be this rectangle instead of including the recursive ones.~ Actually never mind. The root really represents the Transition so it doesn't make sense to give it any specific rectangle. It's rather the whole background.

Changed files:
filename: packages/react-devtools-shared/src/backend/fiber/renderer.js
patch: @@ -2251,8 +2251,23 @@ export function attach(
     }
     if (typeof instance.getClientRects === 'function') {
       // DOM
-      const result: Array<Rect> = [];
       const doc = instance.ownerDocument;
+      if (instance === doc.documentElement) {
+        // This is the document element. The size of this element is not actually
+        // what determines the whole scrollable area of the screen. Because any
+        // thing that overflows the document will also contribute to the scrollable.
+        // This is unlike overflow: scroll which clips those.
+        // Therefore, we use the scrollable size for this rect instead.
+        return [
+          {
+            x: 0,
+            y: 0,
+            width: instance.scrollWidth,
+            height: instance.scrollHeight,
+          },
+        ];
+      }
+      const result: Array<Rect> = [];
       const win = doc && doc.defaultView;
       const scrollX = win ? win.scrollX : 0;
       const scrollY = win ? win.scrollY : 0;
Repository: ollama/ollama
Pull request: ci: fix windows build


Changed files:
filename: .github/workflows/release.yaml
patch: @@ -163,7 +163,7 @@ jobs:
           cmake --preset "${{ matrix.preset }}" ${{ matrix.flags }} -DOLLAMA_RUNNER_DIR="${{ matrix.runner_dir }}"
           cmake --build --parallel --preset "${{ matrix.preset }}"
           cmake --install build --component "${{ startsWith(matrix.preset, 'CUDA ') && 'CUDA' || startsWith(matrix.preset, 'ROCm ') && 'HIP' || 'CPU' }}" --strip --parallel 8
-          rm -force dist\lib\ollama\rocm\rocblas\library\*gfx906*
+          Remove-Item -Path dist\lib\ollama\rocm\rocblas\library\*gfx906* -ErrorAction SilentlyContinue
         env:
           CMAKE_GENERATOR: Ninja
       - uses: actions/upload-artifact@v4
@@ -210,6 +210,7 @@ jobs:
         with:
           go-version-file: go.mod
       - run: |
+          go clean -cache
           go build -o dist/${{ matrix.os }}-${{ matrix.arch }}/ .
       - uses: actions/upload-artifact@v4
         with:
Repository: ollama/ollama
Pull request: ci: fix windows build


Changed files:
filename: .github/workflows/release.yaml
patch: @@ -163,7 +163,7 @@ jobs:
           cmake --preset "${{ matrix.preset }}" ${{ matrix.flags }} -DOLLAMA_RUNNER_DIR="${{ matrix.runner_dir }}"
           cmake --build --parallel --preset "${{ matrix.preset }}"
           cmake --install build --component "${{ startsWith(matrix.preset, 'CUDA ') && 'CUDA' || startsWith(matrix.preset, 'ROCm ') && 'HIP' || 'CPU' }}" --strip --parallel 8
-          rm -f dist\lib\ollama\rocm\rocblas\library\*gfx906*
+          rm -force dist\lib\ollama\rocm\rocblas\library\*gfx906*
         env:
           CMAKE_GENERATOR: Ninja
       - uses: actions/upload-artifact@v4
Repository: rust-lang/rust
Pull request: Derive Macro Eq: link to more detailed documentation

Match the other derive macros in the module (Ord, PartialEq, PartialOrd) by linking to the section in the trait documentation about how the derive macro works.

<!-- homu-ignore:start -->
<!--
If this PR is related to an unstable feature or an otherwise tracked effort,
please link to the relevant tracking issue here. If you don't know of a related
tracking issue or there are none, feel free to ignore this.

This PR will get automatically assigned to a reviewer. In case you would like
a specific user to review your work, you can assign it to them by using

    r? <reviewer name>
-->

@rustbot label +A-docs
<!-- homu-ignore:end -->


Changed files:
filename: library/core/src/cmp.rs
patch: @@ -357,6 +357,7 @@ pub const trait Eq: [const] PartialEq<Self> + PointeeSized {
 }
 
 /// Derive macro generating an impl of the trait [`Eq`].
+/// The behavior of this macro is described in detail [here](Eq#derivable).
 #[rustc_builtin_macro]
 #[stable(feature = "builtin_macro_prelude", since = "1.38.0")]
 #[allow_internal_unstable(core_intrinsics, derive_eq_internals, structural_match)]
Repository: nodejs/node
Pull request: doc: correct description of `error.stack` accessor behavior

The existing description in errors.md is outdated as of v21.x:

- The hidden internal stack trace property is set at construct time, and is no longer lazily generated.
- The accessors now perform a brand check, and do nothing if the `this` value passed to the getter/setter is not a native error.

This behaviour isn't mentioned in V8/Chromium documentation nor MDN, so it's worth spelling out here.

`Error.isError()` doesn't exist in v22.x, so this will need a specific PR referencing `util.types.isNativeError()` instead.

Refs: #60862

Changed files:
filename: doc/api/errors.md
patch: @@ -379,13 +379,17 @@ The location information will be one of:
   represents a call in a user program (using ES module system), or
   its dependencies.
 
-The string representing the stack trace is lazily generated when the
-`error.stack` property is **accessed**.
-
 The number of frames captured by the stack trace is bounded by the smaller of
 `Error.stackTraceLimit` or the number of available frames on the current event
 loop tick.
 
+`error.stack` is a getter/setter for a hidden internal property which is only
+present on builtin `Error` objects (those for which [`Error.isError`][] returns
+true). If `error` is not a builtin error object, then the `error.stack` getter
+will always return `undefined`, and the setter will do nothing. This can occur
+if the accessor is manually invoked with a `this` value that is not a builtin
+error object, such as a {Proxy}.
+
 ## Class: `AssertionError`
 
 * Extends: {errors.Error}
@@ -4381,6 +4385,7 @@ An error occurred trying to allocate memory. This should never happen.
 [`ERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST`]: #err_missing_message_port_in_transfer_list
 [`ERR_MISSING_TRANSFERABLE_IN_TRANSFER_LIST`]: #err_missing_transferable_in_transfer_list
 [`ERR_REQUIRE_ASYNC_MODULE`]: #err_require_async_module
+[`Error.isError`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/isError
 [`EventEmitter`]: events.md#class-eventemitter
 [`MessagePort`]: worker_threads.md#class-messageport
 [`Object.getPrototypeOf`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getPrototypeOf
Repository: ollama/ollama
Pull request: llm: Enable flash attention by default for qwen3 and qwen3moe


Changed files:
filename: fs/ggml/ggml.go
patch: @@ -899,6 +899,8 @@ func (f GGML) SupportsFlashAttention() bool {
 func (f GGML) FlashAttention() bool {
 	return slices.Contains([]string{
 		"gptoss", "gpt-oss",
+		"qwen3",
+		"qwen3moe",
 	}, f.KV().String("general.architecture"))
 }
Repository: facebook/react
Pull request: Allow running `yarn lint` on subset of paths

We always hardcoded a pattern for `yarn lint` matching the whole monorepo. This is slow when working on linting infra where `yarn linc` (i.e. just running on changed files) might not include a specific override.

Now you can run e.g. `yarn lint packages/react-devtools-*` to lint just devtools packages. This is matching how the ESLint CLI works by default. `yarn lint` will still lint everything.

Changed files:
filename: scripts/eslint/index.js
patch: @@ -72,12 +72,18 @@ function intersect(files, patterns) {
   return [...new Set(intersection)];
 }
 
-async function runESLint({onlyChanged, ...options}) {
+async function runESLint({onlyChanged, paths, ...options}) {
   if (typeof onlyChanged !== 'boolean') {
     throw new Error('Pass options.onlyChanged as a boolean.');
   }
+  if (onlyChanged && paths !== undefined) {
+    throw new Error('Cannot specify paths when onlyChanged is true.');
+  }
+  if (paths === undefined || paths.length === 0) {
+    paths = allPaths;
+  }
   const {errorCount, warningCount, output} = await runESLintOnFilesWithOptions(
-    allPaths,
+    paths,
     onlyChanged,
     options
   );

filename: scripts/tasks/eslint.js
patch: @@ -16,9 +16,9 @@ async function main() {
     console.log('Hint: run `yarn linc` to only lint changed files.');
   }
 
-  const {_, ...cliOptions} = minimist(process.argv.slice(2));
+  const {_: paths, ...cliOptions} = minimist(process.argv.slice(2));
 
-  if (await runESLint({onlyChanged: false, ...cliOptions})) {
+  if (await runESLint({onlyChanged: false, ...cliOptions, paths})) {
     console.log('Lint passed.');
   } else {
     console.log('Lint failed.');
Repository: ollama/ollama
Pull request: llm: Allow overriding flash attention setting

As we automatically enable flash attention for more models, there are likely some cases where we get it wrong. This allows setting OLLAMA_FLASH_ATTENTION=0 to disable it, even for models that usually have flash attention.

Changed files:
filename: envconfig/config.go
patch: @@ -145,8 +145,8 @@ func Remotes() []string {
 	return r
 }
 
-func Bool(k string) func() bool {
-	return func() bool {
+func BoolWithDefault(k string) func(defaultValue bool) bool {
+	return func(defaultValue bool) bool {
 		if s := Var(k); s != "" {
 			b, err := strconv.ParseBool(s)
 			if err != nil {
@@ -156,7 +156,14 @@ func Bool(k string) func() bool {
 			return b
 		}
 
-		return false
+		return defaultValue
+	}
+}
+
+func Bool(k string) func() bool {
+	withDefault := BoolWithDefault(k)
+	return func() bool {
+		return withDefault(false)
 	}
 }
 
@@ -177,7 +184,7 @@ func LogLevel() slog.Level {
 
 var (
 	// FlashAttention enables the experimental flash attention feature.
-	FlashAttention = Bool("OLLAMA_FLASH_ATTENTION")
+	FlashAttention = BoolWithDefault("OLLAMA_FLASH_ATTENTION")
 	// KvCacheType is the quantization type for the K/V cache.
 	KvCacheType = String("OLLAMA_KV_CACHE_TYPE")
 	// NoHistory disables readline history.
@@ -263,7 +270,7 @@ type EnvVar struct {
 func AsMap() map[string]EnvVar {
 	ret := map[string]EnvVar{
 		"OLLAMA_DEBUG":             {"OLLAMA_DEBUG", LogLevel(), "Show additional debug information (e.g. OLLAMA_DEBUG=1)"},
-		"OLLAMA_FLASH_ATTENTION":   {"OLLAMA_FLASH_ATTENTION", FlashAttention(), "Enabled flash attention"},
+		"OLLAMA_FLASH_ATTENTION":   {"OLLAMA_FLASH_ATTENTION", FlashAttention(false), "Enabled flash attention"},
 		"OLLAMA_KV_CACHE_TYPE":     {"OLLAMA_KV_CACHE_TYPE", KvCacheType(), "Quantization type for the K/V cache (default: f16)"},
 		"OLLAMA_GPU_OVERHEAD":      {"OLLAMA_GPU_OVERHEAD", GpuOverhead(), "Reserve a portion of VRAM per GPU (bytes)"},
 		"OLLAMA_HOST":              {"OLLAMA_HOST", Host(), "IP Address for the ollama server (default 127.0.0.1:11434)"},

filename: llm/memory.go
patch: @@ -195,7 +195,7 @@ func estimateGPULayers(gpus []discover.GpuInfo, f *ggml.GGML, projectors []strin
 		slog.Warn("model missing blk.0 layer size")
 	}
 
-	useFlashAttention := (envconfig.FlashAttention() || f.FlashAttention()) &&
+	useFlashAttention := envconfig.FlashAttention(f.FlashAttention()) &&
 		(discover.GpuInfoList)(gpus).FlashAttentionSupported() &&
 		f.SupportsFlashAttention()
 

filename: llm/server.go
patch: @@ -196,14 +196,10 @@ func NewLlamaServer(gpus discover.GpuInfoList, modelPath string, f *ggml.GGML, a
 		loadRequest.ProjectorPath = projectors[0]
 	}
 
+	fa := envconfig.FlashAttention(f.FlashAttention())
+
 	// This will disable flash attention unless all GPUs on the system support it, even if we end up selecting a subset
 	// that can handle it.
-	fa := envconfig.FlashAttention()
-	if f.FlashAttention() {
-		slog.Info("model wants flash attention")
-		fa = true
-	}
-
 	if fa && !gpus.FlashAttentionSupported() {
 		slog.Warn("flash attention enabled but not supported by gpu")
 		fa = false
Repository: ollama/ollama
Pull request: fix panic on bootstrapDevices

Wrong index variable was used.

Changed files:
filename: discover/runner.go
patch: @@ -456,7 +456,7 @@ func bootstrapDevices(ctx context.Context, ollamaLibDirs []string, extraEnvs []s
 				extra := strings.SplitN(extraEnvs[j], "=", 2)
 				if cmp[0] == extra[0] {
 					cmd.Env[i] = extraEnvs[j]
-					extraDone[i] = true
+					extraDone[j] = true
 				}
 			}
 		}
Repository: nodejs/node
Pull request: test_runner: propagate V8 options to child process

This PR should address #60986!

At the moment, this solution doesn't take into account `NODE_OPTIONS` nor the config file.
In order to support both of them, at least for V8 options defined as `kV8Option`, changes to `GetOptionsAsFlags` are required.

They will follow in a follow-up PR.


Changed files:
filename: lib/internal/test_runner/runner.js
patch: @@ -154,6 +154,22 @@ function getRunArgs(path, { forceExit,
                             cwd }) {
   const processNodeOptions = getOptionsAsFlagsFromBinding();
   const runArgs = ArrayPrototypeFilter(processNodeOptions, filterExecArgv);
+
+  /**
+   * Node supports V8 options passed via cli.
+   * These options are being consumed by V8 and are not stored in nodeOptions.
+   *
+   * We need to propagate these options to the child processes manually.
+   *
+   * An example of such option are --allow-natives-syntax and --expose-gc
+   */
+  const nodeOptionsSet = new SafeSet(processNodeOptions);
+  const unknownProcessExecArgv = ArrayPrototypeFilter(
+    process.execArgv,
+    (arg) => !nodeOptionsSet.has(arg),
+  );
+  ArrayPrototypePushApply(runArgs, unknownProcessExecArgv);
+
   if (forceExit === true) {
     ArrayPrototypePush(runArgs, '--test-force-exit');
   }

filename: test/fixtures/test-runner/flag-propagation/issue-60986.mjs
patch: @@ -0,0 +1,7 @@
+import { describe, it } from "node:test";
+
+describe("test", () => {
+  it("calls gc", () => {
+    globalThis.gc();
+  });
+});

filename: test/parallel/test-runner-flag-propagation.js
patch: @@ -125,4 +125,28 @@ describe('test runner flag propagation', () => {
       });
     }
   });
+
+  describe('V8 specific flags', () => {
+    const v8FlagTestFixture = path.join(fixtureDir, 'issue-60986.mjs');
+    it('should propagate V8 only flags to child tests', () => {
+
+      const child = spawnSync(
+        process.execPath,
+        [
+          '--allow-natives-syntax',
+          '--expose-gc',
+          '--test',
+          v8FlagTestFixture,
+        ],
+        {
+          cwd: fixtureDir,
+        },
+      );
+
+      assert.strictEqual(child.status, 0, `V8 flag propagation test failed.`);
+      const stdout = child.stdout.toString();
+      assert.match(stdout, /tests 1/, `Test should execute for V8 flag propagation`);
+      assert.match(stdout, /pass 1/, `Test should pass for V8 flag propagation check`);
+    });
+  });
 });
Repository: rust-lang/rust
Pull request: Rename `cycle_check` to `find_cycle`

This renames `cycle_check` to `find_cycle` as that fits a bit better.

Changed files:
filename: compiler/rustc_query_impl/src/job.rs
patch: @@ -155,11 +155,11 @@ fn abstracted_waiters_of(job_map: &QueryJobMap<'_>, query: QueryJobId) -> Vec<Ab
     result
 }
 
-/// Look for query cycles by doing a depth first search starting at `query`.
+/// Looks for a query cycle by doing a depth first search starting at `query`.
 /// `span` is the reason for the `query` to execute. This is initially DUMMY_SP.
 /// If a cycle is detected, this initial value is replaced with the span causing
-/// the cycle.
-fn cycle_check<'tcx>(
+/// the cycle. `stack` will contain just the cycle on return if detected.
+fn find_cycle<'tcx>(
     job_map: &QueryJobMap<'tcx>,
     query: QueryJobId,
     span: Span,
@@ -190,7 +190,7 @@ fn cycle_check<'tcx>(
             continue;
         };
         if let ControlFlow::Break(maybe_resumable) =
-            cycle_check(job_map, parent, abstracted_waiter.span, stack, visited)
+            find_cycle(job_map, parent, abstracted_waiter.span, stack, visited)
         {
             // Return the resumable waiter in `waiter.resumable` if present
             return ControlFlow::Break(abstracted_waiter.resumable.or(maybe_resumable));
@@ -232,7 +232,7 @@ fn connected_to_root<'tcx>(
     false
 }
 
-/// Looks for query cycles starting from the last query in `jobs`.
+/// Looks for a query cycle using the last query in `jobs`.
 /// If a cycle is found, all queries in the cycle is removed from `jobs` and
 /// the function return true.
 /// If a cycle was not found, the starting query is removed from `jobs` and
@@ -246,7 +246,7 @@ fn remove_cycle<'tcx>(
     let mut stack = Vec::new();
     // Look for a cycle starting with the last query in `jobs`
     if let ControlFlow::Break(resumable) =
-        cycle_check(job_map, jobs.pop().unwrap(), DUMMY_SP, &mut stack, &mut visited)
+        find_cycle(job_map, jobs.pop().unwrap(), DUMMY_SP, &mut stack, &mut visited)
     {
         // The stack is a vector of pairs of spans and queries; reverse it so that
         // the earlier entries require later entries