helloadhavan/github_issues huggingface dataset:
Repository: denoland/deno
Pull request: ci: use cirrus linux arm64 runner

Migrating away from Ubicloud

Changed files:
filename: .github/workflows/ci.generate.ts
patch: @@ -9,7 +9,7 @@ const cacheVersion = 81;
 
 const ubuntuX86Runner = "ubuntu-24.04";
 const ubuntuX86XlRunner = "ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04";
-const ubuntuARMRunner = "ubicloud-standard-16-arm";
+const ubuntuARMRunner = "ghcr.io/cirruslabs/ubuntu-runner-arm64:24.04";
 const windowsX86Runner = "windows-2022";
 const windowsX86XlRunner = "windows-2022-xl";
 const macosX86Runner = "macos-13";
@@ -540,6 +540,11 @@ const ci = {
         },
         cacheCargoHomeStep,
         installRustStep,
+        {
+          if: "matrix.os == 'linux' && matrix.arch == 'aarch64'",
+          name: "Load 'vsock_loopback; kernel module",
+          run: "sudo modprobe vsock_loopback",
+        },
         {
           if: "matrix.job == 'test' || matrix.job == 'bench'",
           ...installDenoStep,

filename: .github/workflows/ci.yml
patch: @@ -113,12 +113,12 @@ jobs:
             use_sysroot: true
           - os: linux
             arch: aarch64
-            runner: ubicloud-standard-16-arm
+            runner: 'ghcr.io/cirruslabs/ubuntu-runner-arm64:24.04'
             job: test
             profile: debug
           - os: linux
             arch: aarch64
-            runner: '${{ (!contains(github.event.pull_request.labels.*.name, ''ci-full'') && (github.event_name == ''pull_request'')) && ''ubuntu-24.04'' || ''ubicloud-standard-16-arm'' }}'
+            runner: '${{ (!contains(github.event.pull_request.labels.*.name, ''ci-full'') && (github.event_name == ''pull_request'')) && ''ubuntu-24.04'' || ''ghcr.io/cirruslabs/ubuntu-runner-arm64:24.04'' }}'
             job: test
             profile: release
             use_sysroot: true
@@ -178,6 +178,9 @@ jobs:
         if: '!(matrix.skip)'
       - uses: dsherret/rust-toolchain-file@v1
         if: '!(matrix.skip)'
+      - if: '!(matrix.skip) && (matrix.os == ''linux'' && matrix.arch == ''aarch64'')'
+        name: Load 'vsock_loopback; kernel module
+        run: sudo modprobe vsock_loopback
       - if: '!(matrix.skip) && (matrix.job == ''test'' || matrix.job == ''bench'')'
         name: Install Deno
         uses: denoland/setup-deno@v2
Repository: denoland/deno
Pull request: Revert "fix(resolver): fall back to execution if can't resolve types"

I don't think we should do this. This isn't what TypeScript does.

The fix in https://github.com/denoland/deno/pull/31509 will move it to a typescript diagnostic instead of a hard error.

Reverts denoland/deno#31507

Changed files:
filename: libs/resolver/npm/mod.rs
patch: @@ -513,21 +513,6 @@ impl<
     match resolution_result {
       Ok(url) => Ok(url),
       Err(err) => {
-        if err.as_types_not_found().is_some() {
-          // failed to find types, just fall back to normal resolution
-          debug_assert_eq!(resolution_kind, NodeResolutionKind::Types);
-          if let Ok(resolved) =
-            self.node_resolver.resolve_package_subpath_from_deno_module(
-              &package_folder,
-              sub_path,
-              Some(referrer),
-              resolution_mode,
-              NodeResolutionKind::Execution,
-            )
-          {
-            return Ok(resolved);
-          }
-        }
         if matches!(self.npm_resolver, NpmResolver::Byonm(_)) {
           let package_json_path = package_folder.join("package.json");
           if !self.sys.fs_exists_no_err(&package_json_path) {

filename: tests/specs/check/nmd_manual_no_types/__test__.jsonc
patch: @@ -1,24 +0,0 @@
-{
-  "tempDir": true,
-  "steps": [
-    {
-      "args": "install",
-      "output": "[WILDCARD]"
-    },
-    {
-      "args": "check main.ts",
-      "output": "check.out"
-    }
-  ],
-  "variants": {
-    "tsgo": {
-      "use_tsgo": "1"
-    },
-    "tsc": {
-      "use_tsgo": ""
-    }
-  },
-  "envs": {
-    "DENO_UNSTABLE_TSGO": "${use_tsgo}"
-  }
-}

filename: tests/specs/check/nmd_manual_no_types/check.out
patch: @@ -1 +0,0 @@
-Check [WILDCARD]main.ts

filename: tests/specs/check/nmd_manual_no_types/deno.json
patch: @@ -1,6 +0,0 @@
-{
-  "nodeModulesDir": "manual",
-  "imports": {
-    "@denotest/no-types-cjs": "npm:@denotest/no-types-cjs@1.0.0"
-  }
-}

filename: tests/specs/check/nmd_manual_no_types/main.ts
patch: @@ -1,3 +0,0 @@
-import mod from "@denotest/no-types-cjs";
-
-console.log(mod);
Repository: ggml-org/llama.cpp
Pull request: fix: TypeError when loading base model remotely in convert_lora_to_gguf


When loading base model from Hugging Face, `dir_base_model` is `None`, causing `TypeError` in `index_tensors()`.

```python
TypeError: unsupported operand type(s) for /: 'NoneType' and 'str'
```

Passes `remote_hf_model_id` to `LoraModel` to load tensors from Hugging Face.

Related issue:

- #17350

Changed files:
filename: convert_lora_to_gguf.py
patch: @@ -277,10 +277,15 @@ def parse_args() -> argparse.Namespace:
     return parser.parse_args()
 
 
-def load_hparams_from_hf(hf_model_id: str) -> dict[str, Any]:
+def load_hparams_from_hf(hf_model_id: str) -> tuple[dict[str, Any], Path | None]:
+    from huggingface_hub import try_to_load_from_cache
+
     # normally, adapter does not come with base model config, we need to load it from AutoConfig
     config = AutoConfig.from_pretrained(hf_model_id)
-    return config.to_dict()
+    cache_dir = try_to_load_from_cache(hf_model_id, "config.json")
+    cache_dir = Path(cache_dir).parent if isinstance(cache_dir, str) else None
+
+    return config.to_dict(), cache_dir
 
 
 if __name__ == '__main__':
@@ -325,13 +330,13 @@ def load_hparams_from_hf(hf_model_id: str) -> dict[str, Any]:
     # load base model
     if base_model_id is not None:
         logger.info(f"Loading base model from Hugging Face: {base_model_id}")
-        hparams = load_hparams_from_hf(base_model_id)
+        hparams, dir_base_model = load_hparams_from_hf(base_model_id)
     elif dir_base_model is None:
         if "base_model_name_or_path" in lparams:
             model_id = lparams["base_model_name_or_path"]
             logger.info(f"Loading base model from Hugging Face: {model_id}")
             try:
-                hparams = load_hparams_from_hf(model_id)
+                hparams, dir_base_model = load_hparams_from_hf(model_id)
             except OSError as e:
                 logger.error(f"Failed to load base model config: {e}")
                 logger.error("Please try downloading the base model and add its path to --base")
@@ -480,6 +485,7 @@ def modify_tensors(self, data_torch: Tensor, name: str, bid: int | None) -> Iter
             dir_lora_model=dir_lora,
             lora_alpha=alpha,
             hparams=hparams,
+            remote_hf_model_id=base_model_id,
         )
 
         logger.info("Exporting model...")
Repository: ollama/ollama
Pull request: Disable CUDA peer access as a workaround for multi-gpu inference bug

When CUDA peer access is enabled, multi-gpu inference will produce garbage output. This is a known bug of llama.cpp (or nvidia). Until the upstream bug https://github.com/ggerganov/llama.cpp/issues/3772 is fixed, we can disable CUDA peer access temporarily to ensure correct output.

See #961.

Changed files:
filename: llm/llama.cpp/generate_linux.go
patch: @@ -21,6 +21,6 @@ package llm
 //go:generate cmake -S ggml -B ggml/build/cuda -DLLAMA_CUBLAS=on -DLLAMA_ACCELERATE=on -DLLAMA_K_QUANTS=on
 //go:generate cmake --build ggml/build/cuda --target server --config Release
 //go:generate mv ggml/build/cuda/bin/server ggml/build/cuda/bin/ollama-runner
-//go:generate cmake -S gguf -B gguf/build/cuda -DLLAMA_CUBLAS=on -DLLAMA_ACCELERATE=on -DLLAMA_K_QUANTS=on -DLLAMA_NATIVE=off -DLLAMA_AVX=on -DLLAMA_AVX2=off -DLLAMA_AVX512=off -DLLAMA_FMA=off -DLLAMA_F16C=off
+//go:generate cmake -S gguf -B gguf/build/cuda -DLLAMA_CUBLAS=on -DLLAMA_ACCELERATE=on -DLLAMA_K_QUANTS=on -DLLAMA_NATIVE=off -DLLAMA_AVX=on -DLLAMA_AVX2=off -DLLAMA_AVX512=off -DLLAMA_FMA=off -DLLAMA_F16C=off -DLLAMA_CUDA_PEER_MAX_BATCH_SIZE=0
 //go:generate cmake --build gguf/build/cuda --target server --config Release
 //go:generate mv gguf/build/cuda/bin/server gguf/build/cuda/bin/ollama-runner
Repository: denoland/deno
Pull request: Revert "feat(BREAKING/compile): require providing `--` for script arguments"

Reverts denoland/deno#31296

Changed files:
filename: cli/args/flags.rs
patch: @@ -2646,16 +2646,8 @@ On the first invocation of `deno compile`, Deno will download the relevant binar
       .arg(env_file_arg())
       .arg(
         script_arg()
-          .num_args(0..=1)
-          .required_unless_present("help"),
-      )
-      .arg(
-        Arg::new("args")
-          .num_args(0..)
-          .help("Arguments to provide for Deno.args (must be preceded by `--`)")
-          .action(ArgAction::Append)
-          .value_name("ARGS")
-          .last(true)
+          .required_unless_present("help")
+          .trailing_var_arg(true),
       )
   })
 }
@@ -5654,11 +5646,9 @@ fn compile_parse(
   flags.type_check_mode = TypeCheckMode::Local;
   runtime_args_parse(flags, matches, true, false, true)?;
 
-  let source_file = matches.remove_one::<String>("script_arg").unwrap();
-  let args = matches
-    .remove_many::<String>("args")
-    .unwrap_or_default()
-    .collect();
+  let mut script = matches.remove_many::<String>("script_arg").unwrap();
+  let source_file = script.next().unwrap();
+  let args = script.collect();
   let output = matches.remove_one::<String>("output");
   let target = matches.remove_one::<String>("target");
   let icon = matches.remove_one::<String>("icon");
@@ -11899,7 +11889,7 @@ mod tests {
   #[test]
   fn compile_with_flags() {
     #[rustfmt::skip]
-    let r = flags_from_vec(svec!["deno", "compile", "--include", "include.txt", "--exclude", "exclude.txt", "--import-map", "import_map.json", "--no-code-cache", "--no-remote", "--config", "tsconfig.json", "--no-check", "--unsafely-ignore-certificate-errors", "--reload", "--lock", "lock.json", "--cert", "example.crt", "--cached-only", "--location", "https:foo", "--allow-read", "--allow-net", "--v8-flags=--help", "--seed", "1", "--no-terminal", "--icon", "favicon.ico", "--output", "colors", "--env=.example.env", "https://examples.deno.land/color-logging.ts", "--", "foo", "bar", "-p", "8080"]);
+    let r = flags_from_vec(svec!["deno", "compile", "--include", "include.txt", "--exclude", "exclude.txt", "--import-map", "import_map.json", "--no-code-cache", "--no-remote", "--config", "tsconfig.json", "--no-check", "--unsafely-ignore-certificate-errors", "--reload", "--lock", "lock.json", "--cert", "example.crt", "--cached-only", "--location", "https:foo", "--allow-read", "--allow-net", "--v8-flags=--help", "--seed", "1", "--no-terminal", "--icon", "favicon.ico", "--output", "colors", "--env=.example.env", "https://examples.deno.land/color-logging.ts", "foo", "bar", "-p", "8080"]);
     assert_eq!(
       r.unwrap(),
       Flags {

filename: tests/integration/compile_tests.rs
patch: @@ -81,7 +81,6 @@ fn standalone_args() {
       "--output",
       &exe.to_string_lossy(),
       "./compile/args.ts",
-      "--",
       "a",
       "b",
     ])
Repository: huggingface/transformers
Pull request: Improve torch_dtype checks

# What does this PR do?

Improve `torch_dtype` checks. The old check overwrites `dtype` when `torch_dtype`=`bf16` and `dtype` =`auto`. However, the intention of specifiying `auto` is different from not specifying the value.

Changed files:
filename: src/transformers/commands/chat.py
patch: @@ -289,8 +289,14 @@ class ChatArguments:
     def __post_init__(self):
         """Only used for BC `torch_dtype` argument."""
         # In this case only the BC torch_dtype was given
-        if self.torch_dtype is not None and self.dtype == "auto":
-            self.dtype = self.torch_dtype
+        if self.torch_dtype is not None:
+            if self.dtype is None:
+                self.dtype = self.torch_dtype
+            elif self.torch_dtype != self.dtype:
+                raise ValueError(
+                    f"`torch_dtype` {self.torch_dtype} and `dtype` {self.dtype} have different values. `torch_dtype` is deprecated and "
+                    "will be removed in 4.59.0, please set `dtype` instead."
+                )
 
 
 def chat_command_factory(args: Namespace):

filename: src/transformers/commands/serving.py
patch: @@ -457,8 +457,14 @@ class ServeArguments:
     def __post_init__(self):
         """Only used for BC `torch_dtype` argument."""
         # In this case only the BC torch_dtype was given
-        if self.torch_dtype is not None and self.dtype == "auto":
-            self.dtype = self.torch_dtype
+        if self.torch_dtype is not None:
+            if self.dtype is None:
+                self.dtype = self.torch_dtype
+            elif self.torch_dtype != self.dtype:
+                raise ValueError(
+                    f"`torch_dtype` {self.torch_dtype} and `dtype` {self.dtype} have different values. `torch_dtype` is deprecated and "
+                    "will be removed in 4.59.0, please set `dtype` instead."
+                )
 
 
 class ServeCommand(BaseTransformersCLICommand):

filename: src/transformers/pipelines/keypoint_matching.py
patch: @@ -147,7 +147,7 @@ def __call__(
     def preprocess(self, images, timeout=None):
         images = [load_image(image, timeout=timeout) for image in images]
         model_inputs = self.image_processor(images=images, return_tensors=self.framework)
-        model_inputs = model_inputs.to(self.torch_dtype)
+        model_inputs = model_inputs.to(self.dtype)
         target_sizes = [image.size for image in images]
         preprocess_outputs = {"model_inputs": model_inputs, "target_sizes": target_sizes}
         return preprocess_outputs
Repository: facebook/react
Pull request: feat(compiler): Implement constant string concat propagation

## Summary

Resolves #29617

## How did you test this change?
I verified the implementation using the test.


Changed files:
filename: compiler/packages/babel-plugin-react-compiler/src/Optimization/ConstantPropagation.ts
patch: @@ -327,6 +327,8 @@ function evaluateInstruction(
           case "+": {
             if (typeof lhs === "number" && typeof rhs === "number") {
               result = { kind: "Primitive", value: lhs + rhs, loc: value.loc };
+            } else if (typeof lhs === "string" && typeof rhs === "string") {
+              result = { kind: "Primitive", value: lhs + rhs, loc: value.loc };
             }
             break;
           }

filename: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/constant-propagation-string-concat.expect.md
patch: @@ -0,0 +1,35 @@
+
+## Input
+
+```javascript
+function foo() {
+  const a = "a" + "b";
+  const c = "c";
+  return a + c;
+}
+
+export const FIXTURE_ENTRYPOINT = {
+  fn: foo,
+  params: [],
+  isComponent: false,
+};
+
+```
+
+## Code
+
+```javascript
+function foo() {
+  return "abc";
+}
+
+export const FIXTURE_ENTRYPOINT = {
+  fn: foo,
+  params: [],
+  isComponent: false,
+};
+
+```
+      
+### Eval output
+(kind: ok) "abc"
\ No newline at end of file

filename: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/constant-propagation-string-concat.js
patch: @@ -0,0 +1,11 @@
+function foo() {
+  const a = "a" + "b";
+  const c = "c";
+  return a + c;
+}
+
+export const FIXTURE_ENTRYPOINT = {
+  fn: foo,
+  params: [],
+  isComponent: false,
+};
Repository: ggml-org/llama.cpp
Pull request: Fix transposed SOLVE_TRI result

Last turn of optimizations for threading resulted in an unintended transpose in the result matrix.

Changed files:
filename: ggml/src/ggml-cpu/ops.cpp
patch: @@ -9696,13 +9696,12 @@ static void ggml_compute_forward_solve_tri_f32(const struct ggml_compute_params
         for (int64_t i00 = 0; i00 < n; ++i00) {
             float sum = 0.0f;
             for (int64_t t = 0; t < i00; ++t) {
-                sum += A_batch[i00 * n + t] * X_batch[i01 * n + t];
+                sum += A_batch[i00 * n + t] * X_batch[t * k + i01];
             }
 
             const float diag = A_batch[i00 * n + i00];
             GGML_ASSERT(diag != 0.0f && "Zero diagonal in triangular matrix");
-
-            X_batch[i01 * n + i00] = (B_batch[i00 * k + i01] - sum) / diag;
+            X_batch[i00 * k + i01] = (B_batch[i00 * k + i01] - sum) / diag;
         }
     }
 }
Repository: denoland/deno
Pull request: fix(resolver): fall back to execution if can't resolve types

Fixes https://github.com/denoland/deno/issues/31352

This matches the behavior of the other node_modules_dir modes more closely as well as tsc's behavior. Failing to find types should not be an error

Changed files:
filename: libs/resolver/npm/mod.rs
patch: @@ -526,6 +526,19 @@ impl<
           {
             return Ok(resolved);
           }
+          // failed to find types, just fall back to normal resolution
+          debug_assert_eq!(resolution_kind, NodeResolutionKind::Types);
+          if let Ok(resolved) =
+            self.node_resolver.resolve_package_subpath_from_deno_module(
+              &package_folder,
+              sub_path,
+              Some(referrer),
+              resolution_mode,
+              NodeResolutionKind::Execution,
+            )
+          {
+            return Ok(resolved);
+          }
         }
         if matches!(self.npm_resolver, NpmResolver::Byonm(_)) {
           let package_json_path = package_folder.join("package.json");

filename: tests/specs/check/nmd_manual_no_types/__test__.jsonc
patch: @@ -0,0 +1,24 @@
+{
+  "tempDir": true,
+  "steps": [
+    {
+      "args": "install",
+      "output": "[WILDCARD]"
+    },
+    {
+      "args": "check main.ts",
+      "output": "check.out"
+    }
+  ],
+  "variants": {
+    "tsgo": {
+      "use_tsgo": "1"
+    },
+    "tsc": {
+      "use_tsgo": ""
+    }
+  },
+  "envs": {
+    "DENO_UNSTABLE_TSGO": "${use_tsgo}"
+  }
+}

filename: tests/specs/check/nmd_manual_no_types/check.out
patch: @@ -0,0 +1 @@
+Check [WILDCARD]main.ts

filename: tests/specs/check/nmd_manual_no_types/deno.json
patch: @@ -0,0 +1,6 @@
+{
+  "nodeModulesDir": "manual",
+  "imports": {
+    "@denotest/no-types-cjs": "npm:@denotest/no-types-cjs@1.0.0"
+  }
+}

filename: tests/specs/check/nmd_manual_no_types/main.ts
patch: @@ -0,0 +1,3 @@
+import mod from "@denotest/no-types-cjs";
+
+console.log(mod);
Repository: huggingface/transformers
Pull request: [`Jetmoe`] Fix RoPE

Seems like the integration tests on our CI also died for a while.

Fixes the rope dimension for jetmoe by setting a respective attribute mapping - the normal calculation is not valid, ie `hidden_dim / num_attn_heads`. For reference, why this is valid see https://github.com/huggingface/transformers/blob/895b3ebe418ebcf6a37fc838ff0effdb69d98386/src/transformers/models/jetmoe/modeling_jetmoe.py#L494
There could be better solutions but not sure if it's worth the effort. 
Fixes #40817

cc @gante @ArthurZucker 

Changed files:
filename: src/transformers/models/jetmoe/configuration_jetmoe.py
patch: @@ -94,6 +94,7 @@ class JetMoeConfig(PretrainedConfig):
 
     model_type = "jetmoe"
     keys_to_ignore_at_inference = ["past_key_values"]
+    attribute_map = {"head_dim": "kv_channels"}
 
     def __init__(
         self,

filename: src/transformers/models/jetmoe/modeling_jetmoe.py
patch: @@ -932,15 +932,6 @@ def forward(
         if position_ids is None:
             position_ids = cache_position.unsqueeze(0)
 
-        if attention_mask is not None and self._attn_implementation == "flash_attention_2" and use_cache:
-            batch_size = inputs_embeds.shape[0]
-            is_padding_right = attention_mask[:, -1].sum().item() != batch_size
-            if is_padding_right:
-                raise ValueError(
-                    "You are attempting to perform batched generation with padding_side='right'"
-                    " this may lead to unexpected behaviour for Flash Attention version of JetMoe. Make sure to "
-                    " call `tokenizer.padding_side  = 'left'` before tokenizing the input. "
-                )
         causal_mask = self._update_causal_mask(
             attention_mask, inputs_embeds, cache_position, past_key_values, output_attentions
         )

filename: tests/models/jetmoe/test_modeling_jetmoe.py
patch: @@ -184,12 +184,10 @@ def test_model_8b_batched_generation(self):
         tokenizer = AutoTokenizer.from_pretrained("jetmoe/jetmoe-8b", use_fast=False)
         model = JetMoeForCausalLM.from_pretrained("jetmoe/jetmoe-8b")
         input_ids = tokenizer(prompt, return_tensors="pt", padding=True).to(model.model.embed_tokens.weight.device)
-        print(input_ids)
 
         # greedy generation outputs
         generated_ids = model.generate(**input_ids, max_new_tokens=10, temperature=0)
         text = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)
-        print(text)
         self.assertEqual(EXPECTED_TEXT_COMPLETION, text)
 
         del model
Repository: ollama/ollama
Pull request: document response in modelfile template variables

Document #1427, to be merged on next release

Changed files:
filename: docs/modelfile.md
patch: @@ -156,11 +156,12 @@ PARAMETER <parameter> <parametervalue>
 
 #### Template Variables
 
-| Variable        | Description                                                                                                   |
-| --------------- | ------------------------------------------------------------------------------------------------------------- |
-| `{{ .System }}` | The system message used to specify custom behavior, this must also be set in the Modelfile as an instruction. |
-| `{{ .Prompt }}` | The incoming prompt, this is not specified in the model file and will be set based on input.                  |
-| `{{ .First }}`  | A boolean value used to render specific template information for the first generation of a session.           |
+| Variable          | Description                                                                                                   |
+| ----------------- | ------------------------------------------------------------------------------------------------------------- |
+| `{{ .System }}`   | The system message used to specify custom behavior, this must also be set in the Modelfile as an instruction. |
+| `{{ .Prompt }}`   | The incoming prompt, this is not specified in the model file and will be set based on input.                  |
+| `{{ .Response }}` | The response from the LLM, if not specified response is appended to the end of the template.                  |
+| `{{ .First }}`    | A boolean value used to render specific template information for the first generation of a session.           |
 
 ```modelfile
 TEMPLATE """