helloadhavan/github_issues huggingface dataset:
Repository: vercel/next.js
Pull request: Turbopack: inline `typeof window` in node_modules for server

We can't inline it in the browser because window is indeed undefined in web workers. But in the server context, it is indeed always undefined
related: 
- https://github.com/vercel/next.js/pull/8361
- https://github.com/vercel/next.js/pull/8355
- https://github.com/vercel/next.js/issues/7873

Closes PACK-4944

Changed files:
filename: crates/next-core/src/next_server/context.rs
patch: @@ -613,10 +613,6 @@ pub async fn get_server_module_options_context(
             };
 
             let foreign_code_module_options_context = ModuleOptionsContext {
-                ecmascript: EcmascriptOptionsContext {
-                    enable_typeof_window_inlining: None,
-                    ..module_options_context.ecmascript
-                },
                 module_rules: foreign_next_server_rules.clone(),
                 enable_webpack_loaders: foreign_enable_webpack_loaders,
                 // NOTE(WEB-1016) PostCSS transforms should also apply to foreign code.
@@ -680,10 +676,6 @@ pub async fn get_server_module_options_context(
             next_server_rules.extend(source_transform_rules);
 
             let foreign_code_module_options_context = ModuleOptionsContext {
-                ecmascript: EcmascriptOptionsContext {
-                    enable_typeof_window_inlining: None,
-                    ..module_options_context.ecmascript
-                },
                 module_rules: foreign_next_server_rules.clone(),
                 enable_webpack_loaders: foreign_enable_webpack_loaders,
                 // NOTE(WEB-1016) PostCSS transforms should also apply to foreign code.

filename: turbopack/crates/turbopack/src/module_options/module_options_context.rs
patch: @@ -71,7 +71,7 @@ pub enum DecoratorsKind {
 }
 
 /// The types when replacing `typeof window` with a constant.
-#[derive(Clone, PartialEq, Eq, Debug, TraceRawVcs, Serialize, Deserialize, NonLocalValue)]
+#[derive(Copy, Clone, PartialEq, Eq, Debug, TraceRawVcs, Serialize, Deserialize, NonLocalValue)]
 pub enum TypeofWindow {
     Object,
     Undefined,
Repository: electron/electron
Pull request: fix: incorrect WCO tooltip in RTL

Backport of #45405

See that PR for details.


Notes: Fixed an issue where RTL tooltips could be incorrect when using WCO on Windows.


Changed files:
filename: shell/browser/ui/views/win_caption_button_container.cc
patch: @@ -39,7 +39,8 @@ std::unique_ptr<WinCaptionButton> CreateCaptionButton(
 }
 
 bool HitTestCaptionButton(WinCaptionButton* button, const gfx::Point& point) {
-  return button && button->GetVisible() && button->bounds().Contains(point);
+  return button && button->GetVisible() &&
+         button->GetMirroredBounds().Contains(point);
 }
 
 }  // anonymous namespace
Repository: facebook/react
Pull request: Upgrade to Flow 0.217.0

Just keeping React up to date.

[Changelog](https://github.com/facebook/flow/blob/main/Changelog.md)

Changed files:
filename: package.json
patch: @@ -64,8 +64,8 @@
     "eslint-plugin-react-internal": "link:./scripts/eslint-rules",
     "fbjs-scripts": "^3.0.1",
     "filesize": "^6.0.1",
-    "flow-bin": "^0.215.0",
-    "flow-remove-types": "^2.215.0",
+    "flow-bin": "^0.217.0",
+    "flow-remove-types": "^2.217.0",
     "glob": "^7.1.6",
     "glob-stream": "^6.1.0",
     "google-closure-compiler": "^20230206.0.0",

filename: scripts/flow/config/flowconfig
patch: @@ -36,4 +36,4 @@ munge_underscores=false
 %REACT_RENDERER_FLOW_OPTIONS%
 
 [version]
-^0.215.0
+^0.217.0

filename: yarn.lock
patch: @@ -7866,22 +7866,22 @@ flatted@^3.1.0:
   resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787"
   integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==
 
-flow-bin@^0.215.0:
-  version "0.215.0"
-  resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.215.0.tgz#6f6b42ab34a56758f381bbd0543173f06a20b7be"
-  integrity sha512-oleH4I3o1moLjN8wwfiiD4H9VVhgq6EP7y3xcrQaBMm0/qiYSmnhcSnqcDnc2KPTI9a+X2Z5BWSbO/lXeRTW5A==
-
-flow-parser@^0.215.0:
-  version "0.215.0"
-  resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.215.0.tgz#9b153fa27ab238bcc0bb1ff73b63bdb15d3f277d"
-  integrity sha512-8bjwzy8vi+fNDy8YoTBNtQUSZa53i7UWJJTunJojOtjab9cMNhOCwohionuMgDQUU0y21QTTtPOX6OQEOQT72A==
-
-flow-remove-types@^2.215.0:
-  version "2.215.0"
-  resolved "https://registry.yarnpkg.com/flow-remove-types/-/flow-remove-types-2.215.0.tgz#f1f6d5c8706ab3ea002ceb0bf5502b98a2b661f7"
-  integrity sha512-VU7DXzL3sWoGH2aeEYDAlz2Cj1Y9f3SgREakJSNcFFiDAb/eZvCVQAulEDn/FXqXR754emprq+mQUigFCz/IsQ==
-  dependencies:
-    flow-parser "^0.215.0"
+flow-bin@^0.217.0:
+  version "0.217.0"
+  resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.217.0.tgz#c255b4d8d815520d396416c2f712ab849d61f467"
+  integrity sha512-AbbDE6QUpR+jpY9ejNROAk0P5D/2PxJzjU4D5vfmMwtS+QjjPjzfZGuatEJIn2k4PTZ2agbncaCtyHGO0AvG7A==
+
+flow-parser@^0.217.0:
+  version "0.217.0"
+  resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.217.0.tgz#0e6bed214151fa3240dc9fd83ac8a9e050e523c5"
+  integrity sha512-hEa5n0dta1RcaDwJDWbnyelw07PK7+Vx0f9kDht28JOt2hXgKdKGaT3wM45euWV2DxOXtzDSTaUgGSD/FPvC2Q==
+
+flow-remove-types@^2.217.0:
+  version "2.217.0"
+  resolved "https://registry.yarnpkg.com/flow-remove-types/-/flow-remove-types-2.217.0.tgz#b09084445b2cd929330638d7b8f1aacaa288c43a"
+  integrity sha512-4NbzbbseCAnPERMhPt7cwlRjynXda/fatzHCWCRBsnGO43oqSG5PqzZKEBJXngCJuVS8M5YQrw3ad3psPTEfCQ==
+  dependencies:
+    flow-parser "^0.217.0"
     pirates "^3.0.2"
     vlq "^0.2.1"
Repository: nodejs/node
Pull request: crypto: forbid passing `Float16Array` to `getRandomValues()`

Depends on: https://github.com/nodejs/node/pull/57879

Changed files:
filename: lib/internal/crypto/random.js
patch: @@ -57,6 +57,7 @@ const {
   isArrayBufferView,
   isAnyArrayBuffer,
   isTypedArray,
+  isFloat16Array,
   isFloat32Array,
   isFloat64Array,
 } = require('internal/util/types');
@@ -315,6 +316,7 @@ function onJobDone(buf, callback, error) {
 // be an integer-type TypedArray.
 function getRandomValues(data) {
   if (!isTypedArray(data) ||
+      isFloat16Array(data) ||
       isFloat32Array(data) ||
       isFloat64Array(data)) {
     // Ordinarily this would be an ERR_INVALID_ARG_TYPE. However,

filename: test/wpt/status/WebCryptoAPI.cjs
patch: @@ -11,14 +11,6 @@ module.exports = {
   'historical.any.js': {
     'skip': 'Not relevant in Node.js context',
   },
-  'getRandomValues.any.js': {
-    'fail': {
-      'note': 'Node.js does not support Float16Array',
-      'expected': [
-        'Float16 arrays',
-      ],
-    },
-  },
   'sign_verify/eddsa_small_order_points.https.any.js': {
     'fail': {
       'note': 'see https://github.com/nodejs/node/issues/54572',

filename: test/wpt/test-webcrypto.js
patch: @@ -1,3 +1,5 @@
+// Flags: --js-float16array
+// TODO(LiviaMedeiros): once `Float16Array` is unflagged in v8, remove the line above
 'use strict';
 
 const common = require('../common');
Repository: denoland/deno
Pull request: fix(runtime/web_worker): populate `SnapshotOptions` for `WebWorker` when instantiated without snapshot

Fixes #25277

<!--
Before submitting a PR, please read https://docs.deno.com/runtime/manual/references/contributing

1. Give the PR a descriptive title.

  Examples of good title:
    - fix(std/http): Fix race condition in server
    - docs(console): Update docstrings
    - feat(doc): Handle nested reexports

  Examples of bad title:
    - fix #7123
    - update docs
    - fix bugs

2. Ensure there is a related issue and it is referenced in the PR text.
3. Ensure there are tests that cover the changes.
4. Ensure `cargo test` passes.
5. Ensure `./tools/format.js` passes without changing files.
6. Ensure `./tools/lint.js` passes.
7. Open as a draft PR if your work is still in progress. The CI won't run
   all steps, but you can add '[ci]' to a commit message to force it to.
8. If you would like to run the benchmarks on the CI, add the 'ci-bench' label.
-->


Changed files:
filename: runtime/web_worker.rs
patch: @@ -506,7 +506,13 @@ impl WebWorker {
       ops::signal::deno_signal::init_ops_and_esm(),
       ops::tty::deno_tty::init_ops_and_esm(),
       ops::http::deno_http_runtime::init_ops_and_esm(),
-      ops::bootstrap::deno_bootstrap::init_ops_and_esm(None),
+      ops::bootstrap::deno_bootstrap::init_ops_and_esm(
+        if options.startup_snapshot.is_some() {
+          None
+        } else {
+          Some(Default::default())
+        },
+      ),
       deno_permissions_web_worker::init_ops_and_esm(
         permissions,
         enable_testing_features,
Repository: vercel/next.js
Pull request: [turbopack[ Fix a bug in top level `this` analysis

### What

Fix a bug where we incorrectly identified a `this` reference in a getter prop of an object literal as being 'top level'.

Reported here: https://github.com/vercel/next.js/pull/80925#issuecomment-3018327194

Closes PACK-4945

Changed files:
filename: turbopack/crates/turbopack-ecmascript/src/analyzer/graph.rs
patch: @@ -797,11 +797,13 @@ pub fn is_in_try(ast_path: &AstNodePath<AstParentNodeRef<'_>>) -> bool {
         .iter()
         .rev()
         .find_map(|ast_ref| match ast_ref.kind() {
-            AstParentKind::ArrowExpr(ArrowExprField::Body) => Some(false),
-            AstParentKind::Function(FunctionField::Body) => Some(false),
-            AstParentKind::Constructor(ConstructorField::Body) => Some(false),
-            AstParentKind::ClassMethod(ClassMethodField::Function) => Some(false),
-            AstParentKind::MethodProp(MethodPropField::Function) => Some(false),
+            AstParentKind::ArrowExpr(ArrowExprField::Body)
+            | AstParentKind::Function(FunctionField::Body)
+            | AstParentKind::Constructor(ConstructorField::Body)
+            | AstParentKind::ClassMethod(ClassMethodField::Function)
+            | AstParentKind::GetterProp(GetterPropField::Body)
+            | AstParentKind::SetterProp(SetterPropField::Body)
+            | AstParentKind::MethodProp(MethodPropField::Function) => Some(false),
             AstParentKind::TryStmt(TryStmtField::Block) => Some(true),
             _ => None,
         })
@@ -1928,6 +1930,8 @@ impl VisitAstPath for Analyzer<'_> {
             matches!(
                 node.kind(),
                 AstParentKind::MethodProp(MethodPropField::Function)
+                    | AstParentKind::GetterProp(GetterPropField::Body)
+                    | AstParentKind::SetterProp(SetterPropField::Body)
                     | AstParentKind::Constructor(ConstructorField::Body)
                     | AstParentKind::ClassMethod(ClassMethodField::Function)
                     | AstParentKind::ClassDecl(ClassDeclField::Class)

filename: turbopack/crates/turbopack-tests/tests/execution/turbopack/basic/cjs-this/input/index.js
patch: @@ -2,6 +2,13 @@ const t = this
 
 it('`this` in cjs should be exports', () => {
   expect(t).toBe(exports)
+  let o = {
+    get foo() {
+      return this
+    },
+  }
+  // Regression test for a bug where we didn't identify the `this` ref in `foo` as being bound.
+  expect(o.foo).toBe(o)
 })
 
 // Use a dummy assignment to ensure we are parsed as a cjs module

filename: turbopack/crates/turbopack-tests/tests/execution/turbopack/basic/esm-this/input/index.js
patch: @@ -2,6 +2,13 @@ const t = this
 
 it('`this` in esm should be undefined', () => {
   expect(t).toBeUndefined()
+  let o = {
+    get foo() {
+      return this
+    },
+  }
+  // Regression test for a bug where we didn't identify the `this` ref in `foo` as being bound.
+  expect(o.foo).toBe(o)
 })
 
 // Use a dummy export to ensure this is parsed as an esm module
Repository: huggingface/transformers
Pull request: fix default value of config to match checkpionts in LLaVa-OV models

# What does this PR do?
fix default value of config to match checkpionts in LLaVa-OV models

Fixes #39089
## Before submitting
- [X] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).

## Who can review?
@zucchini-nlp 


Changed files:
filename: src/transformers/models/llava_onevision/configuration_llava_onevision.py
patch: @@ -176,7 +176,7 @@ def __init__(
                 patch_size=14,
                 image_size=384,
                 num_hidden_layers=26,
-                num_attention_heads=14,
+                num_attention_heads=16,
                 vision_use_head=False,
             )
Repository: electron/electron
Pull request: fix: incorrect WCO tooltip in RTL

#### Description of Change

Refs https://chromium-review.googlesource.com/c/chromium/src/+/6098828.

From CL:

> This CL addresses an issue in RTL languages where the window caption
buttons display incorrect tooltips. The issue was caused by using `bounds()` for hit testing, which does not account for RTL layouts. The fix replaces `bounds()` with `GetMirroredBounds()`, ensuring that hit testing works correctly in both LTR and RTL contexts.

#### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [x] PR description included and stakeholders cc'd
- [x] `npm test` passes
- [x] [PR release notes](https://github.com/electron/clerk/blob/main/README.md) describe the change in a way relevant to app developers, and are [capitalized, punctuated, and past tense](https://github.com/electron/clerk/blob/main/README.md#examples).

#### Release Notes

Notes: Fixed an issue where RTL tooltips could be incorrect when using WCO on Windows.


Changed files:
filename: shell/browser/ui/views/win_caption_button_container.cc
patch: @@ -39,7 +39,8 @@ std::unique_ptr<WinCaptionButton> CreateCaptionButton(
 }
 
 bool HitTestCaptionButton(WinCaptionButton* button, const gfx::Point& point) {
-  return button && button->GetVisible() && button->bounds().Contains(point);
+  return button && button->GetVisible() &&
+         button->GetMirroredBounds().Contains(point);
 }
 
 }  // anonymous namespace
Repository: facebook/react
Pull request: [Fizz] Allow passing a reason to `abortStream`

## Summary

Currently `ReactFizzServer.abort` allows you to pass in the a `reason` error, which then gets passed to the `onError` handler for each task that ends up getting aborted. This adds in the ability to pass down that same `reason` error to `ReactDOMServerFB.abortStream` as well.

## How did you test this change?

Added a test case to ReactDOMServerFB-test.internal.js


Changed files:
filename: packages/react-server-dom-fb/src/ReactDOMServerFB.js
patch: @@ -81,8 +81,8 @@ function renderToStream(children: ReactNodeList, options: Options): Stream {
   };
 }
 
-function abortStream(stream: Stream): void {
-  abort(stream.request);
+function abortStream(stream: Stream, reason: mixed): void {
+  abort(stream.request, reason);
 }
 
 function renderNextChunk(stream: Stream): string {

filename: packages/react-server-dom-fb/src/__tests__/ReactDOMServerFB-test.internal.js
patch: @@ -195,4 +195,22 @@ describe('ReactDOMServerFB', () => {
       'The render was aborted by the server without a reason.',
     ]);
   });
+
+  it('should allow setting an abort reason', () => {
+    const errors = [];
+    const stream = ReactDOMServer.renderToStream(
+      <div>
+        <Suspense fallback={<div>Loading</div>}>
+          <InfiniteSuspend />
+        </Suspense>
+      </div>,
+      {
+        onError(error) {
+          errors.push(error);
+        },
+      },
+    );
+    ReactDOMServer.abortStream(stream, theError);
+    expect(errors).toEqual([theError]);
+  });
 });
Repository: denoland/deno
Pull request: fix(ext/node): use primordials in `ext/node/polyfills/_fs/_fs_lstat.ts`

Towards #24236

Changed files:
filename: ext/node/polyfills/_fs/_fs_lstat.ts
patch: @@ -1,8 +1,5 @@
 // Copyright 2018-2025 the Deno authors. MIT license.
 
-// TODO(petamoriken): enable prefer-primordials for node polyfills
-// deno-lint-ignore-file prefer-primordials
-
 import { denoErrorToNodeError } from "ext:deno_node/internal/errors.ts";
 import {
   BigIntStats,
@@ -13,6 +10,14 @@ import {
   Stats,
 } from "ext:deno_node/_fs/_fs_stat.ts";
 import { promisify } from "ext:deno_node/internal/util.mjs";
+import { primordials } from "ext:core/mod.js";
+
+const {
+  Error,
+  ErrorPrototype,
+  PromisePrototypeThen,
+  ObjectPrototypeIsPrototypeOf,
+} = primordials;
 
 export function lstat(path: string | URL, callback: statCallback): void;
 export function lstat(
@@ -42,7 +47,8 @@ export function lstat(
 
   if (!callback) throw new Error("No callback function supplied");
 
-  Deno.lstat(path).then(
+  PromisePrototypeThen(
+    Deno.lstat(path),
     (stat) => callback(null, CFISBIS(stat, options.bigint)),
     (err) => callback(err),
   );
@@ -73,12 +79,12 @@ export function lstatSync(
   } catch (err) {
     if (
       options?.throwIfNoEntry === false &&
-      err instanceof Deno.errors.NotFound
+      ObjectPrototypeIsPrototypeOf(Deno.errors.NotFound.prototype, err)
     ) {
       return;
     }
 
-    if (err instanceof Error) {
+    if (ObjectPrototypeIsPrototypeOf(ErrorPrototype, err)) {
       throw denoErrorToNodeError(err, { syscall: "stat" });
     } else {
       throw err;
Repository: denoland/deno
Pull request: fix(npm): improve optional peer dep handling

* https://github.com/denoland/deno_npm/pull/89

Closes https://github.com/denoland/deno/issues/28023

Changed files:
filename: Cargo.lock
patch: @@ -1502,7 +1502,7 @@ dependencies = [
  "deno_lint",
  "deno_lockfile 0.25.0",
  "deno_media_type",
- "deno_npm 0.30.0",
+ "deno_npm 0.30.1",
  "deno_npm_cache",
  "deno_package_json",
  "deno_path_util",
@@ -2151,7 +2151,7 @@ dependencies = [
  "deno_fs",
  "deno_media_type",
  "deno_node",
- "deno_npm 0.30.0",
+ "deno_npm 0.30.1",
  "deno_path_util",
  "deno_resolver",
  "deno_runtime",
@@ -2386,9 +2386,9 @@ dependencies = [
 
 [[package]]
 name = "deno_npm"
-version = "0.30.0"
+version = "0.30.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1898f0e811c23246b91b9d424ca0d88c7af2ad87d57949b415be61c1ed2222b7"
+checksum = "c9f0a6683bb7fbd8c2874d7da74f91a4d60ddb0355abe0d3c7cde0119112c9b7"
 dependencies = [
  "async-trait",
  "capacity_builder 0.5.0",
@@ -2414,7 +2414,7 @@ dependencies = [
  "boxed_error",
  "deno_cache_dir",
  "deno_error",
- "deno_npm 0.30.0",
+ "deno_npm 0.30.1",
  "deno_path_util",
  "deno_semver",
  "deno_unsync",
@@ -2565,7 +2565,7 @@ dependencies = [
  "deno_config",
  "deno_error",
  "deno_media_type",
- "deno_npm 0.30.0",
+ "deno_npm 0.30.1",
  "deno_package_json",
  "deno_path_util",
  "deno_semver",
@@ -2969,7 +2969,7 @@ dependencies = [
  "deno_error",
  "deno_lib",
  "deno_media_type",
- "deno_npm 0.30.0",
+ "deno_npm 0.30.1",
  "deno_package_json",
  "deno_path_util",
  "deno_resolver",

filename: Cargo.toml
patch: @@ -60,7 +60,7 @@ deno_graph = "=0.89.3"
 deno_lint = "=0.74.0"
 deno_lockfile = "=0.25.0"
 deno_media_type = { version = "=0.2.8", features = ["module_specifier"] }
-deno_npm = "=0.30.0"
+deno_npm = "=0.30.1"
 deno_path_util = "=0.3.2"
 deno_permissions = { version = "0.55.0", path = "./runtime/permissions" }
 deno_runtime = { version = "0.204.0", path = "./runtime" }

filename: cli/rt/binary.rs
patch: @@ -553,6 +553,7 @@ fn deserialize_npm_snapshot(
         dist: Default::default(),
         dependencies,
         optional_dependencies: Default::default(),
+        optional_peer_dependencies: Default::default(),
         bin: None,
         scripts: Default::default(),
         deprecated: Default::default(),
Repository: ggml-org/llama.cpp
Pull request: Help msg about context shift is incorrect

Help msg about context shift is incorrect

After https://github.com/ggml-org/llama.cpp/pull/15416 , context shift had been disabled by default.
However, the help msg is incorrect.

For example, if we run `llama-cli -h`
```
--no-context-shift                      disables context shift on infinite text generation (default: enabled)
                                        (env: LLAMA_ARG_NO_CONTEXT_SHIFT)
--context-shift                         enables context shift on infinite text generation (default: enabled)
                                        (env: LLAMA_ARG_CONTEXT_SHIFT)
```

After this patch, it would be 
```
--no-context-shift                      disables context shift on infinite text generation (default: enabled)
                                        (env: LLAMA_ARG_NO_CONTEXT_SHIFT)
--context-shift                         enables context shift on infinite text generation (default: disabled)
                                        (env: LLAMA_ARG_CONTEXT_SHIFT)
```

The patch also fixes a typo about `ctx_shift` (inifinite --> infinite).


Changed files:
filename: common/arg.cpp
patch: @@ -1532,7 +1532,7 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
     ).set_examples({LLAMA_EXAMPLE_MAIN, LLAMA_EXAMPLE_SERVER, LLAMA_EXAMPLE_IMATRIX, LLAMA_EXAMPLE_PERPLEXITY}).set_env("LLAMA_ARG_NO_CONTEXT_SHIFT"));
     add_opt(common_arg(
         {"--context-shift"},
-        string_format("enables context shift on infinite text generation (default: %s)", params.ctx_shift ? "disabled" : "enabled"),
+        string_format("enables context shift on infinite text generation (default: %s)", params.ctx_shift ? "enabled" : "disabled"),
         [](common_params & params) {
             params.ctx_shift = true;
         }

filename: common/common.h
patch: @@ -375,7 +375,7 @@ struct common_params {
     bool cont_batching     = true;  // insert new sequences for decoding on-the-fly
     bool flash_attn        = false; // flash attention
     bool no_perf           = false; // disable performance metrics
-    bool ctx_shift         = false;  // context shift on inifinite text generation
+    bool ctx_shift         = false;  // context shift on infinite text generation
     bool swa_full          = false; // use full-size SWA cache (https://github.com/ggml-org/llama.cpp/pull/13194#issuecomment-2868343055)
     bool kv_unified        = false; // enable unified KV cache
Repository: huggingface/transformers
Pull request: Fix llava xpu tests.

To reproduce:
`TRANSFORMERS_TEST_DEVICE=xpu ZE_AFFINITY_MASK=0 RUN_SLOW=1 pytest -rA tests/models/llava/test_modeling_llava.py::LlavaForConditionalGenerationIntegrationTest::test_pixtral_4bit`

Hi @SunMarc . This PR fixed llava tests on XPU because the output slightly differs from cuda. Please review it. Thanks!

Changed files:
filename: tests/models/llava/test_modeling_llava.py
patch: @@ -617,8 +617,13 @@ def test_pixtral_4bit(self):
         generate_ids = model.generate(**inputs, max_new_tokens=50)
         output = processor.batch_decode(generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]
 
-        EXPECTED_GENERATION = "Describe the images. The image showcases a dog, which is prominently positioned in the center, taking up a significant portion of the frame. The dog is situated against a backdrop of a wooden surface, which spans the entire image. The dog appears to be a black Labrador"  # fmt: skip
-        self.assertEqual(output, EXPECTED_GENERATION)
+        EXPECTED_GENERATION = [
+            # CUDA output
+            "Describe the images. The image showcases a dog, which is prominently positioned in the center, taking up a significant portion of the frame. The dog is situated against a backdrop of a wooden surface, which spans the entire image. The dog appears to be a black Labrador",
+            # XPU output
+            "Describe the images.The image showcases a dog, which is prominently positioned in the center, taking up a significant portion of the frame. The dog is situated against a backdrop of a wooden surface, which covers the entire background. The dog appears to be the main focus",
+        ]  # fmt: skip
+        self.assertTrue(output in EXPECTED_GENERATION)
 
     @slow
     @require_bitsandbytes