helloadhavan/github_issues huggingface dataset:
Repository: denoland/deno
Pull request: fix(web): support structuredClone for DOMException

## Summary
- Enables `structuredClone()` and `postMessage()` for `DOMException` objects using the cloneable resource registry from #32672
- Serializes `message`, `name`, and `stack`; `code` is derived from `name` on deserialization
- Supersedes #31156

Ref #31126 (comment)
Closes #31983

Changed files:
filename: ext/web/01_dom_exception.js
patch: @@ -7,7 +7,7 @@
 /// <reference path="../web/internal.d.ts" />
 /// <reference path="../../cli/tsc/dts/lib.deno_web.d.ts" />
 
-import { primordials } from "ext:core/mod.js";
+import { core, primordials } from "ext:core/mod.js";
 const {
   Error,
   ErrorPrototype,
@@ -137,6 +137,18 @@ class DOMException {
     error[_name] = name;
     error[_code] = code;
     error[webidl.brand] = webidl.brand;
+    ObjectDefineProperty(error, core.hostObjectBrand, {
+      __proto__: null,
+      value: () => ({
+        type: "DOMException",
+        message,
+        name,
+        stack: error.stack,
+      }),
+      enumerable: false,
+      configurable: false,
+      writable: false,
+    });
 
     return error;
   }
@@ -217,4 +229,18 @@ for (let i = 0; i < entries.length; ++i) {
   ObjectDefineProperty(DOMException.prototype, key, desc);
 }
 
+core.registerCloneableResource("DOMException", (data) => {
+  const ex = new DOMException(data.message, data.name);
+  if (data.stack !== undefined) {
+    ObjectDefineProperty(ex, "stack", {
+      __proto__: null,
+      value: data.stack,
+      configurable: true,
+      writable: true,
+      enumerable: false,
+    });
+  }
+  return ex;
+});
+
 export { DOMException, DOMExceptionPrototype };

filename: tests/wpt/runner/expectations/html.json
patch: @@ -1154,9 +1154,7 @@
           "ImageData object can be cloned",
           "ImageData expandos are not cloned",
           "Document objects cannot be cloned",
-          "URIError objects from other realms are treated as URIError",
-          "DOMException objects can be cloned",
-          "DOMException objects created by the UA can be cloned"
+          "URIError objects from other realms are treated as URIError"
         ]
       }
     },

filename: tests/wpt/runner/expectations/streams.json
patch: @@ -184,15 +184,10 @@
     "readable-stream.html": {
       "expectedFailures": [
         "cancel should be propagated to the original",
-        "cancel should abort a pending read()",
-        "transferring a non-serializable chunk should error both sides"
-      ]
-    },
-    "reason.html": {
-      "expectedFailures": [
-        "DOMException errors should be preserved"
+        "cancel should abort a pending read()"
       ]
     },
+    "reason.html": true,
     "service-worker.https.html": false,
     "shared-worker.html": false,
     "transform-stream-members.any.html": true,
@@ -204,10 +199,6 @@
       ]
     },
     "worker.html": true,
-    "writable-stream.html": {
-      "expectedFailures": [
-        "writing a unclonable object should error the stream"
-      ]
-    }
+    "writable-stream.html": true
   }
 }
Repository: ollama/ollama
Pull request: Skip scheduling cancelled requests and always reload if unloading

This should fix the issue seen in https://github.com/ollama/ollama/pull/4187. The issue was caused by a new request coming in for the same model _while_ it was being unloaded. I do wonder if there's a better approach here: if we know another request is coming in for a model we're loading, we shouldn't unload it on a context cancel since we'll need it anyways.

This change also discards any incoming requests that have already been cancelled so they aren't scheduled


Changed files:
filename: server/sched.go
patch: @@ -100,6 +100,12 @@ func (s *Scheduler) processPending(ctx context.Context) {
 			return
 		case pending := <-s.pendingReqCh:
 			// Block other requests until we get this pending request running
+
+			if pending.ctx.Err() != nil {
+				slog.Debug("pending request cancelled or timed out, skipping scheduling")
+				continue
+			}
+
 			for {
 				var runnerToExpire *runnerRef
 				s.loadedMu.Lock()
@@ -435,6 +441,10 @@ func (runner *runnerRef) needsReload(ctx context.Context, req *LlmRequest) bool
 		timeout = 2 * time.Minute // Initial load can take a long time for big models on slow systems...
 	}
 
+	if runner.Options == nil {
+		return true
+	}
+
 	// Don't reload runner if num_gpu=-1 was provided
 	optsExisting := runner.Options.Runner
 	optsNew := req.opts.Runner
Repository: ollama/ollama
Pull request: Add BrainSoup to compatible clients list

Hi there,

BrainSoup is a native multi-LLM client for Windows with advanced features such as local document indexing, RAG, multi-modality, multi-agent automation, code interpreter, sandboxed file system and the ability for agents to interact with the local system via customizable events and tools. More information can be found [here](https://www.nurgo-software.com/products/brainsoup).

The latest version is know compatible with Ollama, making BrainSoup an excellent choice for users looking to leverage Ollama's LLMs to their full potential.

I kindly ask for your review of this PR. Thanks for creating such an awesome platform!

Changed files:
filename: README.md
patch: @@ -284,18 +284,19 @@ See the [API documentation](./docs/api.md) for all endpoints.
 - [OllamaGUI](https://github.com/enoch1118/ollamaGUI)
 - [OpenAOE](https://github.com/InternLM/OpenAOE)
 - [Odin Runes](https://github.com/leonid20000/OdinRunes)
-- [LLM-X: Progressive Web App](https://github.com/mrdjohnson/llm-x)
+- [LLM-X](https://github.com/mrdjohnson/llm-x) (Progressive Web App)
 - [AnythingLLM (Docker + MacOs/Windows/Linux native app)](https://github.com/Mintplex-Labs/anything-llm)
 - [Ollama Basic Chat: Uses HyperDiv Reactive UI](https://github.com/rapidarchitect/ollama_basic_chat)
 - [Ollama-chats RPG](https://github.com/drazdra/ollama-chats)
-- [QA-Pilot: Chat with Code Repository](https://github.com/reid41/QA-Pilot)
-- [ChatOllama: Open Source Chatbot based on Ollama with Knowledge Bases](https://github.com/sugarforever/chat-ollama)
-- [CRAG Ollama Chat: Simple Web Search with Corrective RAG](https://github.com/Nagi-ovo/CRAG-Ollama-Chat)
-- [RAGFlow: Open-source Retrieval-Augmented Generation engine based on deep document understanding](https://github.com/infiniflow/ragflow)
-- [StreamDeploy: LLM Application Scaffold](https://github.com/StreamDeploy-DevRel/streamdeploy-llm-app-scaffold)
-- [chat: chat web app for teams](https://github.com/swuecho/chat)
+- [QA-Pilot](https://github.com/reid41/QA-Pilot) (Chat with Code Repository)
+- [ChatOllama](https://github.com/sugarforever/chat-ollama) (Open Source Chatbot based on Ollama with Knowledge Bases)
+- [CRAG Ollama Chat](https://github.com/Nagi-ovo/CRAG-Ollama-Chat) (Simple Web Search with Corrective RAG)
+- [RAGFlow](https://github.com/infiniflow/ragflow) (Open-source Retrieval-Augmented Generation engine based on deep document understanding)
+- [StreamDeploy](https://github.com/StreamDeploy-DevRel/streamdeploy-llm-app-scaffold) (LLM Application Scaffold)
+- [chat](https://github.com/swuecho/chat) (chat web app for teams)
 - [Lobe Chat](https://github.com/lobehub/lobe-chat) with [Integrating Doc](https://lobehub.com/docs/self-hosting/examples/ollama)
-- [Ollama RAG Chatbot: Local Chat with multiple PDFs using Ollama and RAG.](https://github.com/datvodinh/rag-chatbot.git)
+- [Ollama RAG Chatbot](https://github.com/datvodinh/rag-chatbot.git) (Local Chat with multiple PDFs using Ollama and RAG)
+- [BrainSoup](https://www.nurgo-software.com/products/brainsoup) (Flexible native client with RAG & multi-agent automation)
 
 ### Terminal
Repository: ollama/ollama
Pull request: Skip PhysX cudart library

For some reason this library gives incorrect GPU information, so skip it


I'm not convinced yet this is the optimal fix, but queuing this up in case we get ready to cut a new release and haven't found a better solution yet.

Fixes #4008 

Changed files:
filename: gpu/gpu.go
patch: @@ -266,6 +266,11 @@ func FindGPULibs(baseLibName string, defaultPatterns []string) []string {
 	patterns = append(patterns, defaultPatterns...)
 	slog.Debug("gpu library search", "globs", patterns)
 	for _, pattern := range patterns {
+
+		// Nvidia PhysX known to return bogus results
+		if strings.Contains(pattern, "PhysX") {
+			slog.Debug("skipping PhysX cuda library path", "path", pattern)
+		}
 		// Ignore glob discovery errors
 		matches, _ := filepath.Glob(pattern)
 		for _, match := range matches {
Repository: ggml-org/llama.cpp
Pull request: vulkan: in graph_optimize, try to group ADD operations

I saw the adds not staying together in the new nemotron 3 nano model.

This helps a couple percent in nemotron 3 nano. I didn't see any change in the other models I usually test.

Changed files:
filename: ggml/src/ggml-vulkan/ggml-vulkan.cpp
patch: @@ -13502,7 +13502,8 @@ static void ggml_vk_graph_optimize(ggml_backend_t backend, struct ggml_cgraph *
                     !(j == c+1 && c == current_set.back() && graph->nodes[c]->op == GGML_OP_RMS_NORM && graph->nodes[j]->op == GGML_OP_MUL) &&
                     !(j == c+1 && c == current_set.back() && graph->nodes[c]->op == GGML_OP_MUL_MAT && graph->nodes[j]->op == GGML_OP_ADD) &&
                     !(j == c+1 && c == current_set.back() && graph->nodes[c]->op == GGML_OP_MUL_MAT_ID && graph->nodes[j]->op == GGML_OP_ADD_ID) &&
-                    !(j == c+1 && c == current_set.back() && graph->nodes[c]->op == GGML_OP_MUL_MAT_ID && graph->nodes[j]->op == GGML_OP_MUL)) {
+                    !(j == c+1 && c == current_set.back() && graph->nodes[c]->op == GGML_OP_MUL_MAT_ID && graph->nodes[j]->op == GGML_OP_MUL) &&
+                    !(j == c+1 && c == current_set.back() && graph->nodes[c]->op == GGML_OP_ADD && graph->nodes[j]->op == GGML_OP_ADD)) {
                     ok = false;
                     break;
                 }
Repository: huggingface/transformers
Pull request: purge HF_HUB_ENABLE_HF_TRANSFER; promote Xet


Changed files:
filename: benchmark/benches/llama.py
patch: @@ -42,7 +42,7 @@
     GenerationConfig = None
     StaticCache = None
 
-os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
+os.environ["HF_XET_HIGH_PERFORMANCE"] = "1"
 os.environ["TOKENIZERS_PARALLELISM"] = "1"
 
 # Only set torch precision if torch is available

filename: benchmark/requirements.txt
patch: @@ -2,5 +2,5 @@ gpustat==1.1.1
 psutil==6.0.0
 psycopg2==2.9.9
 torch>=2.4.0
-hf_transfer
+hf_xet
 pandas>=1.5.0
\ No newline at end of file
Repository: ollama/ollama
Pull request: Update README.md with StreamDeploy


Changed files:
filename: README.md
patch: @@ -292,6 +292,7 @@ See the [API documentation](./docs/api.md) for all endpoints.
 - [ChatOllama: Open Source Chatbot based on Ollama with Knowledge Bases](https://github.com/sugarforever/chat-ollama)
 - [CRAG Ollama Chat: Simple Web Search with Corrective RAG](https://github.com/Nagi-ovo/CRAG-Ollama-Chat)
 - [RAGFlow: Open-source Retrieval-Augmented Generation engine based on deep document understanding](https://github.com/infiniflow/ragflow)
+- [StreamDeploy: LLM Application Scaffold](https://github.com/StreamDeploy-DevRel/streamdeploy-llm-app-scaffold)
 - [chat: chat web app for teams](https://github.com/swuecho/chat)
 - [Lobe Chat](https://github.com/lobehub/lobe-chat) with [Integrating Doc](https://lobehub.com/docs/self-hosting/examples/ollama)
 - [Ollama RAG Chatbot: Local Chat with multiple PDFs using Ollama and RAG.](https://github.com/datvodinh/rag-chatbot.git)
Repository: nodejs/node
Pull request: http: unbreak keepAliveTimeoutBuffer

If keepAliveTimeoutBuffer is set to undefined (for whatever reason) or if not set at all we will throw.

This adds a guard.

<!--
Before submitting a pull request, please read:

- the CONTRIBUTING guide at https://github.com/nodejs/node/blob/HEAD/CONTRIBUTING.md
- the commit message formatting guidelines at
  https://github.com/nodejs/node/blob/HEAD/doc/contributing/pull-requests.md#commit-message-guidelines

For code changes:
1. Include tests for any bug fixes or new features.
2. Update documentation if relevant.
3. Ensure that `make -j4 test` (UNIX), or `vcbuild test` (Windows) passes.

If you believe this PR should be highlighted in the Node.js CHANGELOG
please add the `notable-change` label.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.
-->


Changed files:
filename: lib/_http_server.js
patch: @@ -1027,11 +1027,16 @@ function resOnFinish(req, res, socket, state, server) {
       socket.end();
     }
   } else if (state.outgoing.length === 0) {
-    if (server.keepAliveTimeout && typeof socket.setTimeout === 'function') {
+    const keepAliveTimeout = NumberIsFinite(server.keepAliveTimeout) && server.keepAliveTimeout >= 0 ?
+      server.keepAliveTimeout : 0;
+    const keepAliveTimeoutBuffer = NumberIsFinite(server.keepAliveTimeoutBuffer) && server.keepAliveTimeoutBuffer >= 0 ?
+      server.keepAliveTimeoutBuffer : 1e3;
+
+    if (keepAliveTimeout && typeof socket.setTimeout === 'function') {
       // Extend the internal timeout by the configured buffer to reduce
       // the likelihood of ECONNRESET errors.
       // This allows fine-tuning beyond the advertised keepAliveTimeout.
-      socket.setTimeout(server.keepAliveTimeout + server.keepAliveTimeoutBuffer);
+      socket.setTimeout(keepAliveTimeout + keepAliveTimeoutBuffer);
       state.keepAliveTimeoutSet = true;
     }
   } else {
Repository: vercel/next.js
Pull request: [turbopack] tweak the doc on the inner graph optimization

This optimization is enabled by default and we already link to the docs so referencing the configuration option is more misleading than helpful.

Fixes https://github.com/vercel/feedback/issues/111264



Closes PACK-5665

Changed files:
filename: docs/01-app/03-api-reference/08-turbopack.mdx
patch: @@ -134,7 +134,7 @@ This can lead to subtle rendering changes when adopting Turbopack, if applicatio
 
 ### Bundle Sizes
 
-Turbopack does not yet have an equivalent to the [Inner Graph Optimization](https://webpack.js.org/configuration/optimization/#optimizationinnergraph) in webpack. This optimization is useful to tree shake large modules. For example:
+Turbopack does not yet have an equivalent to the [Inner Graph Optimization](https://webpack.js.org/configuration/optimization/#optimizationinnergraph) in webpack which is enabled by default. This optimization is useful to tree shake large modules. For example:
 
 ```js filename=large.module.js
 import heavy from 'some-heavy-dependency.js'
@@ -146,9 +146,9 @@ export function usesHeavy() {
 export const CONSTANT_VALUE = 3
 ```
 
-If an application only uses `CONSTANT_VALUE` Turbopack will detect this and delete the `usesHeavy` export but not the corresponding `import`. However, with the `optimization.innerGraph = true` option enabled, webpack can delete the `import` too.
+If an application only uses `CONSTANT_VALUE` Turbopack will detect this and delete the `usesHeavy` export but not the corresponding `import`. However, with the Inner Graph Optimization, webpack can delete the `import` too which can drop the dependency as well.
 
-We are planning to offer an equivalent to the `innerGraph` optimization in Turbopack but it is still under development. If you are affected by this gap, consider manually splitting these modules.
+We are planning to offer an equivalent to the Inner Graph Optimization in Turbopack but it is still under development. If you are affected by this gap, consider manually splitting these modules.
 
 ### Build Caching
Repository: ollama/ollama
Pull request: 👌 IMPROVE: add portkey library for production tools


Changed files:
filename: README.md
patch: @@ -351,6 +351,7 @@ See the [API documentation](./docs/api.md) for all endpoints.
 - [Ollama-ex for Elixir](https://github.com/lebrunel/ollama-ex)
 - [Ollama Connector for SAP ABAP](https://github.com/b-tocs/abap_btocs_ollama)
 - [Testcontainers](https://testcontainers.com/modules/ollama/)
+- [Portkey](https://portkey.ai/docs/welcome/integration-guides/ollama)
 
 ### Mobile
Repository: vercel/next.js
Pull request: Add 16.0.0-beta.0 to next/third-parties peerDeps

Installing `@next/third-parties` warns about peerDeps `next@16.0.0-beta.0`

```
Results:
0 errors
41 unmodified
0 skipped
0 ok
Time elapsed: 2.276seconds

✔ Codemods have been applied successfully.
⚠ Found 1 dependency that seem incompatible with the upgraded package versions.
You may have to update these packages to their latest version or file an issue to ask for support of the upgraded libraries.
@next/third-parties 16.0.0-beta.0
  └── ✕ unmet peer next@"^13.0.0 || ^14.0.0 || ^15.0.0": found 16.0.0-beta.0
```

Changed files:
filename: packages/third-parties/package.json
patch: @@ -32,7 +32,7 @@
     "typescript": "5.9.2"
   },
   "peerDependencies": {
-    "next": "^13.0.0 || ^14.0.0 || ^15.0.0",
+    "next": "^13.0.0 || ^14.0.0 || ^15.0.0 || ^16.0.0-beta.0",
     "react": "^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0"
   }
 }
Repository: nodejs/node
Pull request: doc: stabilize --disable-sigusr1

As titled

Changed files:
filename: doc/api/cli.md
patch: @@ -628,10 +628,12 @@ property throw an exception with the code `ERR_PROTO_ACCESS`.
 added:
   - v23.7.0
   - v22.14.0
+changes:
+  - version: REPLACEME
+    pr-url: https://github.com/nodejs/node/pull/59707
+    description: The option is no longer experimental.
 -->
 
-> Stability: 1.2 - Release candidate
-
 Disable the ability of starting a debugging session by sending a
 `SIGUSR1` signal to the process.
Repository: ggml-org/llama.cpp
Pull request: common : reorganize includes to prioritize vendored deps

Reorganize includes in common to prioritize vendored dependencies.

ref: https://github.com/ggml-org/llama.cpp/pull/18218#issuecomment-3677695322

Changed files:
filename: common/CMakeLists.txt
patch: @@ -85,6 +85,9 @@ add_library(${TARGET} STATIC
     unicode.h
     )
 
+target_include_directories(${TARGET} PUBLIC . ../vendor)
+target_compile_features   (${TARGET} PUBLIC cxx_std_17)
+
 if (BUILD_SHARED_LIBS)
     set_target_properties(${TARGET} PROPERTIES POSITION_INDEPENDENT_CODE ON)
 endif()
@@ -151,9 +154,7 @@ if (LLAMA_LLGUIDANCE)
     set(LLAMA_COMMON_EXTRA_LIBS ${LLAMA_COMMON_EXTRA_LIBS} llguidance ${LLGUIDANCE_PLATFORM_LIBS})
 endif ()
 
-target_include_directories(${TARGET} PUBLIC . ../vendor)
-target_compile_features   (${TARGET} PUBLIC cxx_std_17)
-target_link_libraries     (${TARGET} PRIVATE ${LLAMA_COMMON_EXTRA_LIBS} PUBLIC llama Threads::Threads)
+target_link_libraries(${TARGET} PRIVATE ${LLAMA_COMMON_EXTRA_LIBS} PUBLIC llama Threads::Threads)
 
 
 #
Repository: ollama/ollama
Pull request: Fix llava models not working after first request

Temporary fix for https://github.com/ollama/ollama/issues/4163, although a bit more work is required to understand the root cause

Changed files:
filename: llm/patches/05-clip-fix.diff
patch: @@ -0,0 +1,24 @@
+diff --git a/examples/llava/clip.cpp b/examples/llava/clip.cpp
+index e3c9bcd4..b43f892d 100644
+--- a/examples/llava/clip.cpp
++++ b/examples/llava/clip.cpp
+@@ -573,14 +573,16 @@ static ggml_cgraph * clip_image_build_graph(clip_ctx * ctx, const clip_image_f32
+     struct ggml_tensor * embeddings = inp;
+     if (ctx->has_class_embedding) {
+         embeddings = ggml_new_tensor_3d(ctx0, GGML_TYPE_F32, hidden_size, num_positions, batch_size);
++    }
++    ggml_set_name(embeddings, "embeddings");
++    ggml_set_input(embeddings);
++
++    if (ctx->has_class_embedding) {
+         embeddings = ggml_acc(ctx0, embeddings, model.class_embedding,
+                 embeddings->nb[1], embeddings->nb[2], embeddings->nb[3], 0);
+         embeddings = ggml_acc(ctx0, embeddings, inp,
+                 embeddings->nb[1], embeddings->nb[2], embeddings->nb[3], model.class_embedding->nb[1]);
+     }
+-    ggml_set_name(embeddings, "embeddings");
+-    ggml_set_input(embeddings);
+-
+ 
+     struct ggml_tensor * positions = ggml_new_tensor_1d(ctx0, GGML_TYPE_I32, num_positions);
+     ggml_set_name(positions, "positions");

filename: llm/server.go
patch: @@ -194,8 +194,15 @@ func NewLlamaServer(gpus gpu.GpuInfoList, model string, ggml *GGML, adapters, pr
 		params = append(params, "--numa")
 	}
 
-	// "--cont-batching", // TODO - doesn't seem to have any noticeable perf change for multiple requests
 	numParallel := envconfig.NumParallel
+
+	// TODO (jmorganca): multimodal models don't support parallel yet
+	// see https://github.com/ollama/ollama/issues/4165
+	if len(projectors) > 0 {
+		numParallel = 1
+		slog.Warn("multimodal models don't support parallel requests yet")
+	}
+
 	params = append(params, "--parallel", fmt.Sprintf("%d", numParallel))
 
 	for i := 0; i < len(servers); i++ {
Repository: huggingface/transformers
Pull request: Fix confusing cls assignment

# What does this PR do?

Don't overwrite `cls` incidentally in `__new__`.

Changed files:
filename: src/transformers/utils/fx.py
patch: @@ -777,9 +777,9 @@ def __new__(
         attrs: dict[str, Any],
         proxy_factory_fn: Optional[Callable[[Node], Proxy]] = None,
     ):
-        cls = super().__new__(cls, name, bases, attrs)
-        for attr_name in dir(cls):
-            attr = getattr(cls, attr_name, None)
+        instance = super().__new__(cls, name, bases, attrs)
+        for attr_name in dir(instance):
+            attr = getattr(instance, attr_name, None)
             if attr is None:
                 continue
             if attr_name == "__init__":
@@ -793,8 +793,8 @@ def __new__(
             else:
                 op_type = None
             if op_type is not None:
-                setattr(cls, attr_name, create_wrapper(attr, op_type, proxy_factory_fn=proxy_factory_fn))
-        return cls
+                setattr(instance, attr_name, create_wrapper(attr, op_type, proxy_factory_fn=proxy_factory_fn))
+        return instance
 
 
 def gen_constructor_wrapper(target: Callable) -> tuple[Callable, Callable]: