helloadhavan/github_issues huggingface dataset:
Repository: huggingface/transformers
Pull request: Default to dequantize if cpu in device_map for mxfp4

# What does this PR do?

For mxfp4 gptoss model, if no cuda device is available and the model is prequantized we default to dequantizing it after raising a warning so that it can run on cpu


Changed files:
filename: src/transformers/quantizers/quantizer_mxfp4.py
patch: @@ -61,7 +61,14 @@ def validate_environment(self, *args, **kwargs):
             return
 
         if not torch.cuda.is_available():
-            raise RuntimeError("Using MXFP4 quantized models requires a GPU")
+            if self.pre_quantized:
+                logger.warning_once(
+                    "Using MXFP4 quantized models requires a GPU, we will default to dequantizing the model to bf16"
+                )
+                self.quantization_config.dequantize = True
+                return
+            else:
+                raise RuntimeError("Quantizing a model using MXFP4 requires a GPU")
 
         if not is_accelerate_available():
             raise ImportError("Using mxfp4 requires Accelerate: `pip install accelerate`")
Repository: nodejs/node
Pull request: deps: update simdutf to 5.6.4

This is an automated update of simdutf to 5.6.4.

Changed files:
filename: deps/simdutf/simdutf.h
patch: @@ -1,4 +1,4 @@
-/* auto-generated on 2024-11-21 10:33:28 -0500. Do not edit! */
+/* auto-generated on 2024-12-10 14:54:53 -0500. Do not edit! */
 /* begin file include/simdutf.h */
 #ifndef SIMDUTF_H
 #define SIMDUTF_H
@@ -178,7 +178,12 @@
   #endif
 
 #elif defined(__loongarch_lp64)
-// LoongArch 64-bit
+  #if defined(__loongarch_sx) && defined(__loongarch_asx)
+    #define SIMDUTF_IS_LSX 1
+    #define SIMDUTF_IS_LASX 1
+  #elif defined(__loongarch_sx)
+    #define SIMDUTF_IS_LSX 1
+  #endif
 #else
   // The simdutf library is designed
   // for 64-bit processors and it seems that you are not
@@ -670,7 +675,7 @@ SIMDUTF_DISABLE_UNDESIRED_WARNINGS
 #define SIMDUTF_SIMDUTF_VERSION_H
 
 /** The version of simdutf being used (major.minor.revision) */
-#define SIMDUTF_VERSION "5.6.3"
+#define SIMDUTF_VERSION "5.6.4"
 
 namespace simdutf {
 enum {
@@ -685,7 +690,7 @@ enum {
   /**
    * The revision (major.minor.REVISION) of simdutf being used.
    */
-  SIMDUTF_VERSION_REVISION = 3
+  SIMDUTF_VERSION_REVISION = 4
 };
 } // namespace simdutf
 
@@ -796,6 +801,8 @@ enum instruction_set {
   AVX512VPOPCNTDQ = 0x2000,
   RVV = 0x4000,
   ZVBB = 0x8000,
+  LSX = 0x40000,
+  LASX = 0x80000,
 };
 
 #if defined(__PPC64__)
@@ -987,6 +994,28 @@ static inline uint32_t detect_supported_architectures() {
   }
   return host_isa;
 }
+#elif defined(__loongarch__)
+  #if defined(__linux__)
+    #include <sys/auxv.h>
+  // bits/hwcap.h
+  // #define HWCAP_LOONGARCH_LSX             (1 << 4)
+  // #define HWCAP_LOONGARCH_LASX            (1 << 5)
+  #endif
+
+static inline uint32_t detect_supported_architectures() {
+  uint32_t host_isa = instruction_set::DEFAULT;
+  #if defined(__linux__)
+  uint64_t hwcap = 0;
+  hwcap = getauxval(AT_HWCAP);
+  if (hwcap & HWCAP_LOONGARCH_LSX) {
+    host_isa |= instruction_set::LSX;
+  }
+  if (hwcap & HWCAP_LOONGARCH_LASX) {
+    host_isa |= instruction_set::LASX;
+  }
+  #endif
+  return host_isa;
+}
 #else // fallback
 
 // includes 32-bit ARM.
Repository: ollama/ollama
Pull request: Improve command parsing and multiline string handling

This PR enhances the existing parser package. Main improvements include better error handling, optimized string-to-byte conversions, and efficient handling of multiline strings.

Detailed changes:
- Define a `multilineString` constant for repeated values to avoid duplication.
- Modify the error handling in the `Parse` function to return an error for unknown commands.
- Replace `bytes.ToUpper` and `bytes.ToLower` with `strings.ToUpper` and `strings.ToLower` for faster string conversions.
- Optimize removal of `"""` from multiline strings by using `bytes.Index` and `bytes.LastIndex` instead of `bytes.Replace`.

Changed files:
filename: parser/parser.go
patch: @@ -20,7 +20,6 @@ func (c *Command) Reset() {
 
 func Parse(reader io.Reader) ([]Command, error) {
 	var commands []Command
-
 	var command, modelCommand Command
 
 	scanner := bufio.NewScanner(reader)
@@ -47,6 +46,8 @@ func Parse(reader io.Reader) ([]Command, error) {
 			command.Name = string(fields[0])
 			command.Args = string(fields[1])
 		default:
+			// log a warning for unknown commands
+			fmt.Printf("WARNING: Unknown command: %s\n", fields[0])
 			continue
 		}
 
@@ -55,27 +56,29 @@ func Parse(reader io.Reader) ([]Command, error) {
 	}
 
 	if modelCommand.Args == "" {
-		return nil, fmt.Errorf("no FROM line for the model was specified")
+		return nil, errors.New("no FROM line for the model was specified")
 	}
 
 	return commands, scanner.Err()
 }
 
 func scanModelfile(data []byte, atEOF bool) (advance int, token []byte, err error) {
+	const multilineString = `"""`
+
 	newline := bytes.IndexByte(data, '\n')
 
-	if start := bytes.Index(data, []byte(`"""`)); start >= 0 && start < newline {
-		end := bytes.Index(data[start+3:], []byte(`"""`))
+	if start := bytes.Index(data, []byte(multilineString)); start >= 0 && start < newline {
+		end := bytes.Index(data[start+len(multilineString):], []byte(multilineString))
 		if end < 0 {
 			if atEOF {
-				return 0, nil, errors.New(`unterminated multiline string: """`)
+				return 0, nil, errors.New("unterminated multiline string: " + multilineString)
 			} else {
 				return 0, nil, nil
 			}
 		}
 
-		n := start + 3 + end + 3
-		return n, bytes.Replace(data[:n], []byte(`"""`), []byte(""), 2), nil
+		n := start + len(multilineString) + end + len(multilineString)
+		return n, data[:n], nil
 	}
 
 	return bufio.ScanLines(data, atEOF)
Repository: ggml-org/llama.cpp
Pull request: nitpick : correct MB to MiB

MB was incorrectly used for 1024 x 1024 bytes instead of MiB

*Make sure to read the [contributing guidelines](https://github.com/ggml-org/llama.cpp/blob/master/CONTRIBUTING.md) before submitting a PR*


Changed files:
filename: src/llama-quant.cpp
patch: @@ -920,7 +920,7 @@ static void llama_model_quantize_impl(const std::string & fname_inp, const std::
             new_type = tensor->type;
             new_data = tensor->data;
             new_size = ggml_nbytes(tensor);
-            LLAMA_LOG_INFO("size = %8.3f MB\n", ggml_nbytes(tensor)/1024.0/1024.0);
+            LLAMA_LOG_INFO("size = %8.3f MiB\n", ggml_nbytes(tensor)/1024.0/1024.0);
         } else {
             const int64_t nelements = ggml_nelements(tensor);
 
@@ -1037,8 +1037,8 @@ static void llama_model_quantize_impl(const std::string & fname_inp, const std::
     }
     close_ofstream();
 
-    LLAMA_LOG_INFO("%s: model size  = %8.2f MB\n", __func__, total_size_org/1024.0/1024.0);
-    LLAMA_LOG_INFO("%s: quant size  = %8.2f MB\n", __func__, total_size_new/1024.0/1024.0);
+    LLAMA_LOG_INFO("%s: model size  = %8.2f MiB\n", __func__, total_size_org/1024.0/1024.0);
+    LLAMA_LOG_INFO("%s: quant size  = %8.2f MiB\n", __func__, total_size_new/1024.0/1024.0);
 
     if (qs.n_fallback > 0) {
         LLAMA_LOG_WARN("%s: WARNING: %d of %d tensor(s) required fallback quantization\n",
Repository: denoland/deno
Pull request: fix(ext/node): use primordials in `ext/node/polyfills/internal_binding/_listen.ts`

Towards #24236. Replaces JS builtin `Math.clz32` with the primordial `MathClz32`.

<!--
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: ext/node/polyfills/internal_binding/_listen.ts
patch: @@ -1,14 +1,14 @@
 // Copyright 2018-2025 the Deno authors. MIT license.
 
-// TODO(petamoriken): enable prefer-primordials for node polyfills
-// deno-lint-ignore-file prefer-primordials
+import { primordials } from "ext:core/mod.js";
+const { MathClz32 } = primordials;
 
 /**
  * @param n Number to act on.
  * @return The number rounded up to the nearest power of 2.
  */
 export function ceilPowOf2(n: number) {
-  const roundPowOf2 = 1 << (31 - Math.clz32(n));
+  const roundPowOf2 = 1 << (31 - MathClz32(n));
 
   return roundPowOf2 < n ? roundPowOf2 * 2 : roundPowOf2;
 }
Repository: ollama/ollama
Pull request: enable accelerate

missed this define

Changed files:
filename: llama/llama.go
patch: @@ -3,7 +3,7 @@ package llama
 /*
 #cgo CPPFLAGS: -O3 -DNDEBUG=1
 #cgo CXXFLAGS: -std=c++11
-#cgo darwin CPPFLAGS: -DGGML_USE_METAL=1 -DGGML_METAL_NDEBUG=1
+#cgo darwin CPPFLAGS: -DGGML_USE_ACCELERATE -DGGML_USE_METAL -DGGML_METAL_NDEBUG
 #cgo darwin LDFLAGS: -framework Accelerate -framework Foundation -framework Metal -framework MetalKit -framework MetalPerformanceShaders
 #include <stdlib.h>
 #include "llama.h"
Repository: vercel/next.js
Pull request: update rspack-dev-tests-manifest for failing tests

Rspack `testing for test/development/tsconfig-path-reloading` is failing often these days.
Noticed `test/development/jsconfig-path-reloading` is already in the manifest of the "failed" section.

- [Failed CI](https://github.com/vercel/next.js/actions/runs/16671025870/job/47187245042?pr=81396#step:34:504)
- [DataDog](https://app.datadoghq.com/ci/test/runs?query=test_level%3Atest%20%40test.service%3Anextjs%20%40test.status%3Afail%20%40test.name%3A%28%22tsconfig-path-reloading%20tsconfig%20added%20after%20starting%20dev%20should%20automatically%20fast%20refresh%20content%20when%20path%20is%20added%20without%20error%22%20OR%20%22tsconfig-path-reloading%20tsconfig%20should%20automatically%20fast%20refresh%20content%20when%20path%20is%20added%20without%20error%22%29&agg_m=count&agg_m_source=base&agg_t=count&currentTab=overview&eventStack=&fromUser=false&index=citest&start=1753875198762&end=1754479998762&paused=false)

Changed files:
filename: test/rspack-dev-tests-manifest.json
patch: @@ -4289,14 +4289,14 @@
   },
   "test/development/tsconfig-path-reloading/index.test.ts": {
     "passed": [
-      "tsconfig-path-reloading tsconfig added after starting dev should automatically fast refresh content when path is added without error",
-      "tsconfig-path-reloading tsconfig added after starting dev should load with initial paths config correctly",
-      "tsconfig-path-reloading tsconfig should automatically fast refresh content when path is added without error",
-      "tsconfig-path-reloading tsconfig should load with initial paths config correctly"
+      "tsconfig-path-reloading tsconfig should load with initial paths config correctly",
+      "tsconfig-path-reloading tsconfig should automatically fast refresh content when path is added without error"
     ],
     "failed": [
       "tsconfig-path-reloading tsconfig added after starting dev should recover from module not found when paths is updated",
-      "tsconfig-path-reloading tsconfig should recover from module not found when paths is updated"
+      "tsconfig-path-reloading tsconfig should recover from module not found when paths is updated",
+      "tsconfig-path-reloading tsconfig added after starting dev should load with initial paths config correctly",
+      "tsconfig-path-reloading tsconfig added after starting dev should automatically fast refresh content when path is added without error"
     ],
     "pending": [],
     "flakey": [],
Repository: facebook/react
Pull request: Run `yarn flags` in CI

Stacked on https://github.com/facebook/react/pull/28344

## Summary

To prevent regressions in `yarn flags`. Also helps review of PRs changing feature flags.

## How did you test this change?

- CI: https://app.circleci.com/pipelines/github/facebook/react/50431/workflows/d40a6eeb-e2ff-45a6-a7ff-e00b80c66acd/jobs/782310


Changed files:
filename: .circleci/config.yml
patch: @@ -97,6 +97,16 @@ jobs:
       - setup_node_modules
       - run: node ./scripts/tasks/flow-ci
 
+
+  yarn_flags:
+    docker: *docker
+    environment: *environment
+
+    steps:
+      - checkout
+      - setup_node_modules
+      - run: yarn flags
+
   scrape_warning_messages:
     docker: *docker
     environment: *environment
@@ -447,6 +457,11 @@ workflows:
   build_and_test:
     unless: << pipeline.parameters.prerelease_commit_sha >>
     jobs:
+      - yarn_flags:
+          filters:
+            branches:
+              ignore:
+                - builds/facebook-www
       - yarn_flow:
           filters:
             branches:
Repository: ggml-org/llama.cpp
Pull request: fix KLD percentile output

In `llama-perplexity`, when using `--kl-divergence`, the KL divergence statistics output mistakenly displays the 99th percentile twice. This change fixes that and correctly displays the 90th percentile as originally intended (presumably).

*Make sure to read the [contributing guidelines](https://github.com/ggml-org/llama.cpp/blob/master/CONTRIBUTING.md) before submitting a PR*


Changed files:
filename: tools/perplexity/perplexity.cpp
patch: @@ -1931,7 +1931,7 @@ static void kl_divergence(llama_context * ctx, const common_params & params) {
     LOG("Maximum KLD: %10.6f\n", kld_values.back());
     LOG("99.9%%   KLD: %10.6f\n", percentile(kld_values, 0.999f));
     LOG("99.0%%   KLD: %10.6f\n", percentile(kld_values, 0.990f));
-    LOG("99.0%%   KLD: %10.6f\n", percentile(kld_values, 0.990f));
+    LOG("90.0%%   KLD: %10.6f\n", percentile(kld_values, 0.900f));
     LOG("Median  KLD: %10.6f\n", kld_median);
     LOG("10.0%%   KLD: %10.6f\n", percentile(kld_values, 0.100f));
     LOG(" 5.0%%   KLD: %10.6f\n", percentile(kld_values, 0.050f));
Repository: ollama/ollama
Pull request: update development.md


Changed files:
filename: docs/development.md
patch: @@ -12,6 +12,8 @@ Enable CGO:
 export CGO_ENABLED=1
 ```
 
+You will also need a C/C++ compiler such as GCC for MacOS and Linux or Mingw-w64 GCC for Windows.
+
 Then build ollama:
 
 ```
Repository: denoland/deno
Pull request: fix(ext/node): add process._rawDebug

Even though this is a "private" method in Node.js, it's actually
used in the wild, eg. `aws-iot-device-sdk-v2` uses it.

Closes https://github.com/denoland/deno/issues/30115

Changed files:
filename: ext/node/polyfills/process.ts
patch: @@ -6,6 +6,7 @@
 
 import { core, internals, primordials } from "ext:core/mod.js";
 import { initializeDebugEnv } from "ext:deno_node/internal/util/debuglog.ts";
+import { format } from "ext:deno_node/internal/util/inspect.mjs";
 import {
   op_getegid,
   op_geteuid,
@@ -644,6 +645,13 @@ process.exit = exit;
 /** https://nodejs.org/api/process.html#processabort */
 process.abort = abort;
 
+// NB(bartlomieju): this is a private API in Node.js, but there are packages like
+// `aws-iot-device-sdk-v2` that depend on it
+// https://github.com/denoland/deno/issues/30115
+process._rawDebug = (...args: unknown[]) => {
+  core.print(`${format(...args)}\n`, true);
+};
+
 // Undocumented Node API that is used by `signal-exit` which in turn
 // is used by `node-tap`. It was marked for removal a couple of years
 // ago. See https://github.com/nodejs/node/blob/6a6b3c54022104cc110ab09044a2a0cecb8988e7/lib/internal/bootstrap/node.js#L172

filename: tests/specs/npm/playwright_compat/__test__.jsonc
patch: @@ -7,6 +7,7 @@
     "output": "[WILDCARD]"
   }, {
     "args": "run -A main.ts",
+    "flaky": true,
     "output": "chromium launched\n"
   }]
 }

filename: tests/unit_node/process_test.ts
patch: @@ -944,6 +944,28 @@ Deno.test({
   },
 });
 
+Deno.test({
+  name: "process._rawDebug",
+  async fn() {
+    const command = new Deno.Command(Deno.execPath(), {
+      args: [
+        "run",
+        "--quiet",
+        "./testdata/process_raw_debug.ts",
+      ],
+      cwd: testDir,
+    });
+    const { stdout, stderr } = await command.output();
+
+    assertEquals(stdout.length, 0);
+    const decoder = new TextDecoder();
+    assertEquals(
+      stripAnsiCode(decoder.decode(stderr).trim()),
+      "this should go to stderr { a: 1, b: [ 'a', 2 ] }",
+    );
+  },
+});
+
 Deno.test({
   name: "process.stdout isn't closed when source stream ended",
   async fn() {

filename: tests/unit_node/testdata/process_raw_debug.ts
patch: @@ -0,0 +1,5 @@
+import process from "node:process";
+
+//deno-lint-ignore no-undef
+// @ts-ignore - this is a private API in Node, but some packages depend on it
+process._rawDebug("this should go to stderr", { a: 1, b: ["a", 2] });
Repository: denoland/deno
Pull request: fix(lsp): do not error for bytes or text import of json module

Closes https://github.com/denoland/deno/issues/30101

Changed files:
filename: cli/lsp/diagnostics.rs
patch: @@ -1576,7 +1576,7 @@ fn diagnose_resolution(
           if module.media_type == MediaType::Json {
             match maybe_assert_type {
               // The module has the correct assertion type, no diagnostic
-              Some("json") => (),
+              Some("json" | "text" | "bytes") => (),
               // The dynamic import statement is missing an attribute type, which
               // we might not be able to statically detect, therefore we will
               // not provide a potentially incorrect diagnostic.

filename: tests/integration/lsp_tests.rs
patch: @@ -18902,3 +18902,54 @@ fn do_not_auto_import_from_definitely_typed() {
     client.shutdown();
   }
 }
+
+#[test]
+#[timeout(300_000)]
+fn lsp_import_json_module_import_attribute_variations() {
+  let context = TestContextBuilder::new().use_temp_cwd().build();
+  let temp_dir = context.temp_dir().path();
+  temp_dir.join("deno.json").write_json(&json!({
+    "unstable": ["raw-imports"]
+  }));
+  temp_dir.join("file.json").write_json(&json!({}));
+  let mut client = context.new_lsp_command().build();
+  client.initialize_default();
+  for type_text in ["bytes", "text", "json"] {
+    let diagnostics = client.did_open(json!({
+      "textDocument": {
+        "uri": temp_dir.join(format!("{}.ts", type_text)).uri_file(),
+        "languageId": "typescript",
+        "version": 1,
+        "text": format!("import data from './file.json' with {{ type: '{}' }};\nconsole.log(data);\n", type_text)
+      }
+    }));
+    assert_eq!(json!(diagnostics.all()), json!([]));
+  }
+  let diagnostics = client.did_open(json!({
+    "textDocument": {
+      "uri": temp_dir.join("missing.ts").uri_file(),
+      "languageId": "typescript",
+      "version": 1,
+      "text": "import data from './file.json';\nconsole.log(data);\n",
+    }
+  }));
+  assert_eq!(
+    json!(diagnostics.all()),
+    json!([{
+      "range": {
+        "start": {
+          "line": 0,
+          "character": 17,
+        },
+        "end": {
+          "line": 0,
+          "character": 30,
+        },
+      },
+      "severity": 1,
+      "code": "no-attribute-type",
+      "source": "deno",
+      "message": "The module is a JSON module and not being imported with an import attribute. Consider adding `with { type: \"json\" }` to the import statement."
+    }])
+  );
+}
Repository: denoland/deno
Pull request: v2.2.14


Changed files:
filename: Cargo.lock
patch: @@ -1449,7 +1449,7 @@ dependencies = [
 
 [[package]]
 name = "deno"
-version = "2.2.13"
+version = "2.2.14"
 dependencies = [
  "anstream",
  "async-trait",
@@ -2919,7 +2919,7 @@ dependencies = [
 
 [[package]]
 name = "denort"
-version = "2.2.13"
+version = "2.2.14"
 dependencies = [
  "async-trait",
  "bincode",

filename: Releases.md
patch: @@ -6,6 +6,10 @@ https://github.com/denoland/deno/releases
 We also have one-line install commands at:
 https://github.com/denoland/deno_install
 
+### 2.2.14 / 2025.07.16
+
+- fix: upgrade deno_core to 0.344.1 (#30118)
+
 ### 2.2.13 / 2025.05.13
 
 - fix: handling of contradictory global permission flags (#29213)

filename: cli/Cargo.toml
patch: @@ -2,7 +2,7 @@
 
 [package]
 name = "deno"
-version = "2.2.13"
+version = "2.2.14"
 authors.workspace = true
 default-run = "deno"
 edition.workspace = true

filename: cli/lib/version.txt
patch: @@ -1 +1 @@
-2.2.13
\ No newline at end of file
+2.2.14
\ No newline at end of file

filename: cli/rt/Cargo.toml
patch: @@ -2,7 +2,7 @@
 
 [package]
 name = "denort"
-version = "2.2.13"
+version = "2.2.14"
 authors.workspace = true
 default-run = "denort"
 edition.workspace = true
Repository: ggml-org/llama.cpp
Pull request: cuda : Disable host buffers on integrated GPUs (#15034)

"Integrated" CUDA devices seem to be bugged and produce incorrect output in specific cases. Since disabling the `integrated` flag seems to neither affect performance nor memory usage on Jetson, I propose disabling the option until the underlying issue is fixed.

Fixes #15034 and probably also #15923.

Changed files:
filename: ggml/src/ggml-cuda/ggml-cuda.cu
patch: @@ -231,7 +231,7 @@ static ggml_cuda_device_info ggml_cuda_init() {
 
         info.default_tensor_split[id] = total_vram;
         total_vram += prop.totalGlobalMem;
-        info.devices[id].integrated = prop.integrated;
+        info.devices[id].integrated = false; // Temporarily disabled due to issues with corrupted output (e.g. #15034)
         info.devices[id].nsm        = prop.multiProcessorCount;
         info.devices[id].smpb       = prop.sharedMemPerBlock;
         info.devices[id].warp_size  = prop.warpSize;
Repository: huggingface/transformers
Pull request: Replace `logger.warning` with `logger.warning_once` in `GradientCheckpointingLayer`

You get thousands of this warning during training otherwise 

Changed files:
filename: src/transformers/modeling_layers.py
patch: @@ -89,7 +89,7 @@ def __call__(self, *args, **kwargs):
             # warn if anything was changed
             if do_warn:
                 message = message.rstrip(",") + "."
-                logger.warning(message)
+                logger.warning_once(message)
 
             return self._gradient_checkpointing_func(partial(super().__call__, **kwargs), *args)
         return super().__call__(*args, **kwargs)