helloadhavan/github_issues huggingface dataset:
Repository: huggingface/transformers
Pull request: revert place_model_on_device to property

# What does this PR do?

This PR reverts `place_model_on_device` back to a property. I prefer not introducing new args for now. 

Changed files:
filename: src/transformers/trainer.py
patch: @@ -340,7 +340,7 @@ class Trainer:
           data parallelism, this means some of the model layers are split on different GPUs).
         - **place_model_on_device** -- Whether or not to automatically place the model on the device. Defaults to
           `True` unless model parallel, DeepSpeed, FSDP, full fp16/bf16 eval, or SageMaker MP is active. Can be
-          explicitly set via `TrainingArguments.place_model_on_device`.
+          overridden by subclassing `TrainingArguments` and overriding the `place_model_on_device` property.
         - **is_in_train** -- Whether or not a model is currently running `train` (e.g. when `evaluate` is called while
           in `train`)
 

filename: src/transformers/training_args.py
patch: @@ -1433,12 +1433,6 @@ class TrainingArguments:
             "help": "When using torch.distributed.launch (Deprecated), it will pass `local_rank` in the script, so we need this for the parser. To get the local rank, prefer using the property `local_process_index`"
         },
     )
-    place_model_on_device: bool | None = field(
-        default=None,
-        metadata={
-            "help": "Whether to automatically place the model on the device. When `None` (default), the Trainer decides."
-        },
-    )
 
     def __post_init__(self):
         # ── 1. Defaults & Normalization ──
@@ -1974,6 +1968,13 @@ def get_process_log_level(self):
         log_level_replica_node = logging.get_verbosity() if log_level_replica == -1 else log_level_replica
         return log_level_main_node if self.should_log else log_level_replica_node
 
+    @property
+    def place_model_on_device(self) -> bool | None:
+        """
+        Can be subclassed and overridden for some specific integrations.
+        """
+        return None
+
     @property
     def _no_sync_in_gradient_accumulation(self):
         """
Repository: ggml-org/llama.cpp
Pull request: webui: apply webui_settings on first load

*Make sure to read the [contributing guidelines](https://github.com/ggml-org/llama.cpp/blob/master/CONTRIBUTING.md) before submitting a PR*

The webui_settings from /props were not applied on initial load when default_generation_settings.params was null

Now syncs whenever serverProps is available, regardless of params, works for both single-model and router modes

Close #18185 (Follow-up https://github.com/ggml-org/llama.cpp/pull/18028 https://github.com/ggml-org/llama.cpp/issues/17940)

Changed files:
filename: tools/server/webui/src/lib/stores/settings.svelte.ts
patch: @@ -294,15 +294,14 @@ class SettingsStore {
 	 * This sets up the default values from /props endpoint
 	 */
 	syncWithServerDefaults(): void {
-		const serverParams = serverStore.defaultParams;
-		if (!serverParams) {
-			console.warn('No server parameters available for initialization');
+		const propsDefaults = this.getServerDefaults();
+
+		if (Object.keys(propsDefaults).length === 0) {
+			console.warn('No server defaults available for initialization');
 
 			return;
 		}
 
-		const propsDefaults = this.getServerDefaults();
-
 		for (const [key, propsValue] of Object.entries(propsDefaults)) {
 			const currentValue = getConfigValue(this.config, key);
 

filename: tools/server/webui/src/routes/+layout.svelte
patch: @@ -119,7 +119,7 @@
 	$effect(() => {
 		const serverProps = serverStore.props;
 
-		if (serverProps?.default_generation_settings?.params) {
+		if (serverProps) {
 			settingsStore.syncWithServerDefaults();
 		}
 	});
Repository: nodejs/node
Pull request: doc: fix spacing in process message event

Fixes a small bug into the markdown documentation

<!--
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: doc/api/process.md
patch: @@ -158,7 +158,7 @@ process.on('exit', (code) => {
 added: v0.5.10
 -->
 
-* `message` { Object | boolean | number | string | null } a parsed JSON object
+* `message` {Object|boolean|number|string|null} a parsed JSON object
   or a serializable primitive value.
 * `sendHandle` {net.Server|net.Socket} a [`net.Server`][] or [`net.Socket`][]
   object, or undefined.
Repository: electron/electron
Pull request: build: fix Chromium roll linting merge base determination in CI

Backport of #49937

See that PR for details.


Notes: none <!-- Please add a one-line description for app developers to read in the release notes, or 'none' if no notes relevant to app developers. Examples and help on special cases: https://github.com/electron/clerk/blob/main/README.md#examples -->


Changed files:
filename: script/lint-roller-chromium-changes.mjs
patch: @@ -124,7 +124,7 @@ async function main () {
   // Get the merge base with the target branch
   let mergeBase;
   try {
-    mergeBase = execSync(`git merge-base ${currentBranch} origin/${targetBranch}`, {
+    mergeBase = execSync(`git merge-base HEAD origin/${targetBranch}`, {
       cwd: ELECTRON_DIR,
       encoding: 'utf8'
     }).trim();
Repository: ollama/ollama
Pull request: CONTRIBUTING: fix typo in commit message example (clairity → clarity)

Corrected the word "clairity" to "clarity" in the example commit message

Changed files:
filename: CONTRIBUTING.md
patch: @@ -65,7 +65,7 @@ continuation of the sentence:
 Examples:
 
       llm/backend/mlx: support the llama architecture
-      CONTRIBUTING: provide clairity on good commit messages, and bad
+      CONTRIBUTING: provide clarity on good commit messages, and bad
 
 Bad Examples:
Repository: huggingface/transformers
Pull request: adding BC for custom toks accessing slow tok attrs deprecated in v5


Changed files:
filename: src/transformers/tokenization_utils_tokenizers.py
patch: @@ -529,6 +529,11 @@ def added_tokens_decoder(self) -> dict[int, AddedToken]:
         """
         return self._tokenizer.get_added_tokens_decoder()
 
+    # BC v5: expose ``_added_tokens_encoder`` / ``_added_tokens_decoder`` attrs for custom tokenizers that expect
+    # them from slow tokenizers. Only supports read, not write (won't sync to Rust backend, use add_tokens() instead
+    _added_tokens_encoder = added_tokens_encoder
+    _added_tokens_decoder = added_tokens_decoder
+
     def get_added_vocab(self) -> dict[str, int]:
         """
         Returns the added tokens in the vocabulary as a dictionary of token to index.
Repository: electron/electron
Pull request: build: fix Chromium roll linting merge base determination in CI

#### Description of Change

<!--
Thank you for your Pull Request. Please provide a description above and review
the requirements below.

Contributors guide: https://github.com/electron/electron/blob/main/CONTRIBUTING.md
-->

In CI git doesn't know the branch name since we check out a SHA rather than the branch by ref name. The `git merge-base` call was unnecessarily using the branch name when it could just use `HEAD`, and as a result failing in CI.

I've validated that this runs as expected in CI by temporarily removing the branch restriction.

#### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [x] PR description included

#### Release Notes

Notes: none <!-- Please add a one-line description for app developers to read in the release notes, or 'none' if no notes relevant to app developers. Examples and help on special cases: https://github.com/electron/clerk/blob/main/README.md#examples -->


Changed files:
filename: script/lint-roller-chromium-changes.mjs
patch: @@ -124,7 +124,7 @@ async function main () {
   // Get the merge base with the target branch
   let mergeBase;
   try {
-    mergeBase = execSync(`git merge-base ${currentBranch} origin/${targetBranch}`, {
+    mergeBase = execSync(`git merge-base HEAD origin/${targetBranch}`, {
       cwd: ELECTRON_DIR,
       encoding: 'utf8'
     }).trim();
Repository: ollama/ollama
Pull request: server: add warning message for deprecated context field in /api/generate

The `context` parameter in `/api/generate` has been longtime replaced by functionality in the `/api/chat` endpoint. This PR adds a deprecation warning in the logs when used.

Changed files:
filename: docs/api.md
patch: @@ -49,10 +49,10 @@ Advanced parameters (optional):
 - `options`: additional model parameters listed in the documentation for the [Modelfile](./modelfile.md#valid-parameters-and-values) such as `temperature`
 - `system`: system message to (overrides what is defined in the `Modelfile`)
 - `template`: the prompt template to use (overrides what is defined in the `Modelfile`)
-- `context`: the context parameter returned from a previous request to `/generate`, this can be used to keep a short conversational memory
 - `stream`: if `false` the response will be returned as a single response object, rather than a stream of objects
 - `raw`: if `true` no formatting will be applied to the prompt. You may choose to use the `raw` parameter if you are specifying a full templated prompt in your request to the API
 - `keep_alive`: controls how long the model will stay loaded into memory following the request (default: `5m`)
+- `context` (deprecated): the context parameter returned from a previous request to `/generate`, this can be used to keep a short conversational memory
 
 #### JSON mode
 

filename: server/routes.go
patch: @@ -251,6 +251,7 @@ func (s *Server) GenerateHandler(c *gin.Context) {
 
 		var b bytes.Buffer
 		if req.Context != nil {
+			slog.Warn("the context field is deprecated and will be removed in a future version of Ollama")
 			s, err := r.Detokenize(c.Request.Context(), req.Context)
 			if err != nil {
 				c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
Repository: nodejs/node
Pull request: tools: update nixpkgs-unstable to ae67888ff7ef9dff69b3cf0cc0fbfbcd3a7

This is an automated update of nixpkgs-unstable to ae67888ff7ef9dff69b3cf0cc0fbfbcd3a7.

Changed files:
filename: tools/nix/pkgs.nix
patch: @@ -1,10 +1,10 @@
 arg:
 let
   repo = "https://github.com/NixOS/nixpkgs";
-  rev = "6308c3b21396534d8aaeac46179c14c439a89b8a";
+  rev = "ae67888ff7ef9dff69b3cf0cc0fbfbcd3a722abe";
   nixpkgs = import (builtins.fetchTarball {
     url = "${repo}/archive/${rev}.tar.gz";
-    sha256 = "14qnx22pkl9v4r0lxnnz18f4ybxj8cv18hyf1klzap98hckg58y4";
+    sha256 = "0hbf69ki28s8ss18x4qj9kpcw5afy8qfmd3gw1k6wn2lfhq5ddrz";
   }) arg;
 in
 nixpkgs

filename: tools/nix/sharedLibDeps.nix
patch: @@ -12,6 +12,7 @@
     brotli
     gtest
     libuv
+    merve
     nbytes
     simdjson
     simdutf
@@ -22,10 +23,6 @@
   cares = pkgs.c-ares;
   hdr-histogram = pkgs.hdrhistogram_c;
   http-parser = pkgs.llhttp;
-  merve = pkgs.callPackage (builtins.fetchurl {
-    url = "https://github.com/NixOS/nixpkgs/raw/469b8e35e54d2880d73337c5ef2f1416b9b1dd43/pkgs/by-name/me/merve/package.nix";
-    sha256 = "0r2fmip48hcy4za6xfaml627x9m4218g6vlk5fiajmypfvxybzfy";
-  }) { };
   nghttp2 = pkgs.nghttp2.overrideAttrs {
     patches = [
       (pkgs.fetchpatch2 {
Repository: ollama/ollama
Pull request: cli: catch upstream errors gracefully

Instead of crashing out if the upstream gateway throws an error, display the same message as the UI.

Changed files:
filename: cmd/cmd.go
patch: @@ -1137,6 +1137,14 @@ func chat(cmd *cobra.Command, opts runOptions) (*api.Message, error) {
 		if errors.Is(err, context.Canceled) {
 			return nil, nil
 		}
+
+		// this error should ideally be wrapped properly by the client
+		if strings.Contains(err.Error(), "upstream error") {
+			p.StopAndClear()
+			fmt.Println("An error occurred while processing your message. Please try again.")
+			fmt.Println()
+			return nil, nil
+		}
 		return nil, err
 	}
Repository: facebook/react
Pull request: [playground] Fix CompilerError mismatch

The compiler playground was crashing at any small syntax errors in the `Input` panel due to updating the `CompilerErrorDetailOptions` type in #34401. Updated the option to take in a `ErrorCategory` instead.

Changed files:
filename: compiler/apps/playground/components/Editor/EditorImpl.tsx
patch: @@ -13,7 +13,7 @@ import BabelPluginReactCompiler, {
   CompilerErrorDetail,
   CompilerDiagnostic,
   Effect,
-  ErrorSeverity,
+  ErrorCategory,
   parseConfigPragmaForTests,
   ValueKind,
   type Hook,
@@ -258,7 +258,7 @@ function compile(
       console.error(err);
       error.details.push(
         new CompilerErrorDetail({
-          severity: ErrorSeverity.Invariant,
+          category: ErrorCategory.Invariant,
           reason: `Unexpected failure when transforming input! ${err}`,
           loc: null,
           suggestions: null,

filename: compiler/packages/babel-plugin-react-compiler/src/index.ts
patch: @@ -12,6 +12,7 @@ export {
   CompilerDiagnostic,
   CompilerSuggestionOperation,
   ErrorSeverity,
+  ErrorCategory,
   LintRules,
   type CompilerErrorDetailOptions,
   type CompilerDiagnosticOptions,
Repository: ggml-org/llama.cpp
Pull request: fix: mtmd "v.patch_embd" quant and unsupported im2col ops on Metal for deepseek-ocr

## Bug Fixes

This PR fixes two issues affecting vision models:

1. **Quantization of `v.patch_embd`**
2. **Unsupported `im2col` (bf16) ops on Metal for DeepSeek-OCR**

---

## Details

### Vision Models — `v.patch_embd` Quantization

**Issue**
`v.patch_embd` was incorrectly quantized, causing inference failure when quantizing vision (mmproj) model.

**Fix**
Exclude `v.patch_embd` from quantization across all vision models.

**Validated on**

* `moonshotai/Kimi-VL-A3B-Instruct`
* `OpenGVLab/InternVL3-2B`
* `deepseek-ai/DeepSeek-OCR`

---

### DeepSeek-OCR — Metal bf16 `im2col`

**Issue**
Metal backend does not support `im2col` for bf16, causing `ggml_conv_2d` failures in DeepSeek-OCR vision-model.

**Fix**
Avoid unsupported bf16 `im2col` paths on Metal by using f32 type in conversion and exclude the involved tensors from quantization.

---

## Summary

* Fixes a systemic vision quantization issue (`v.patch_embd`)
* Restores DeepSeek-OCR execution on Metal (bf16)


Changed files:
filename: convert_hf_to_gguf.py
patch: @@ -7150,6 +7150,8 @@ def tensor_force_quant(self, name, new_name, bid, n_dims):
             return gguf.GGMLQuantizationType.F32
         if ".rel_pos_h" in name or '.rel_pos_w' in name:
             return gguf.GGMLQuantizationType.F32
+        if ".neck." in name or ".net_" in name:
+            return gguf.GGMLQuantizationType.F32
         return super().tensor_force_quant(name, new_name, bid, n_dims)
 
     def modify_tensors(self, data_torch: Tensor, name: str, bid: int | None) -> Iterable[tuple[str, Tensor]]:

filename: src/llama-quant.cpp
patch: @@ -345,9 +345,12 @@ static bool tensor_allows_quantization(const llama_model_quantize_params * param
 
     // do not quantize specific multimodal tensors
     quantize &= name.find(".position_embd") == std::string::npos;
-    quantize &= name.find("sam.patch_embd") == std::string::npos;
     quantize &= name.find("sam.pos_embd")   == std::string::npos;
+    quantize &= name.find("sam.neck.")      == std::string::npos;
+    quantize &= name.find("sam.net_")       == std::string::npos;
     quantize &= name.find(".rel_pos")       == std::string::npos;
+    quantize &= name.find(".patch_embd")    == std::string::npos;
+    quantize &= name.find(".patch_merger")  == std::string::npos;
 
     return quantize;
 }
Repository: vuejs/vue
Pull request: fix(types): stricter type condition for `EventHandlers`

<!--
Please make sure to read the Pull Request Guidelines:
https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#pull-request-guidelines
-->

<!-- PULL REQUEST TEMPLATE -->
<!-- (Update "[ ]" to "[x]" to check a box) -->

Closes #12832 

Be related to Vue3 [#6855](https://github.com/vuejs/core/pull/6855)

**What kind of change does this PR introduce?** (check at least one)

- [x] Bugfix
- [ ] Feature
- [ ] Code style update
- [ ] Refactor
- [ ] Build-related changes
- [ ] Other, please describe:

**Does this PR introduce a breaking change?** (check one)

- [ ] Yes
- [x] No

If yes, please describe the impact and migration path for existing applications:

**The PR fulfills these requirements:**

- [ ] It's submitted to the `main` branch for v2.x (or to a previous version branch)
- [ ] When resolving a specific issue, it's referenced in the PR's title (e.g. `fix #xxx[,#xxx]`, where "xxx" is the issue number)
- [ ] All tests are passing: https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#development-setup
- [ ] New/updated tests are included

If adding a **new feature**, the PR's description includes:
- [ ] A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

**Other information:**


Changed files:
filename: types/jsx.d.ts
patch: @@ -1297,7 +1297,9 @@ export interface Events {
 }
 
 type EventHandlers<E> = {
-  [K in keyof E]?: E[K] extends Function ? E[K] : (payload: E[K]) => void
+  [K in keyof E]?: E[K] extends (...args: any) => any
+    ? E[K]
+    : (payload: E[K]) => void
 }
 
 type ReservedProps = {
Repository: ollama/ollama
Pull request: s#x/exp/maps#maps#

this replaces the experimental maps package with the stable maps package. it also simplifies map keys sorting by using `slices.Sorted`

Changed files:
filename: convert/convert_test.go
patch: @@ -11,14 +11,13 @@ import (
 	"io"
 	"io/fs"
 	"log/slog"
+	"maps"
 	"os"
 	"path/filepath"
 	"slices"
 	"strings"
 	"testing"
 
-	"golang.org/x/exp/maps"
-
 	"github.com/ollama/ollama/fs/ggml"
 )
 
@@ -137,9 +136,7 @@ func TestConvertModel(t *testing.T) {
 				t.Fatal(err)
 			}
 
-			keys := maps.Keys(expect)
-			slices.Sort(keys)
-			for _, k := range keys {
+			for _, k := range slices.Sorted(maps.Keys(expect)) {
 				if v, ok := actual[k]; !ok {
 					t.Errorf("missing %s", k)
 				} else if v != expect[k] {
@@ -343,9 +340,7 @@ func TestConvertAdapter(t *testing.T) {
 
 			actual := generateResultsJSON(t, r, m.KV(), m.Tensors())
 
-			keys := maps.Keys(c.Expected)
-			slices.Sort(keys)
-			for _, k := range keys {
+			for _, k := range slices.Sorted(maps.Keys(c.Expected)) {
 				if v, ok := actual[k]; !ok {
 					t.Errorf("missing %s", k)
 				} else if v != c.Expected[k] {

filename: convert/reader_safetensors.go
patch: @@ -8,12 +8,12 @@ import (
 	"fmt"
 	"io"
 	"io/fs"
+	"maps"
 	"slices"
 	"strings"
 
 	"github.com/d4l3k/go-bfloat16"
 	"github.com/x448/float16"
-	"golang.org/x/exp/maps"
 )
 
 type safetensorMetadata struct {
@@ -46,8 +46,7 @@ func parseSafetensors(fsys fs.FS, replacer *strings.Replacer, ps ...string) ([]T
 			return nil, err
 		}
 
-		keys := maps.Keys(headers)
-		slices.Sort(keys)
+		keys := slices.Sorted(maps.Keys(headers))
 
 		names := make(map[string]struct{}, len(keys))
 

filename: convert/tokenizer.go
patch: @@ -8,11 +8,10 @@ import (
 	"fmt"
 	"io/fs"
 	"log/slog"
+	"maps"
 	"os"
 	"slices"
 	"strings"
-
-	"golang.org/x/exp/maps"
 )
 
 const (
@@ -260,11 +259,8 @@ func parseVocabularyFromTokenizer(fsys fs.FS) (*Vocabulary, error) {
 		tokens[token.ID] = token
 	}
 
-	keys := maps.Keys(tokens)
-	slices.Sort(keys)
-
 	v := Vocabulary{Model: "gpt2"}
-	for _, k := range keys {
+	for _, k := range slices.Sorted(maps.Keys(tokens)) {
 		token := tokens[k]
 		v.Tokens = append(v.Tokens, token.Content)
 		v.Scores = append(v.Scores, float32(token.ID))

filename: go.mod
patch: @@ -71,7 +71,7 @@ require (
 	github.com/ugorji/go/codec v1.2.12 // indirect
 	golang.org/x/arch v0.8.0 // indirect
 	golang.org/x/crypto v0.36.0
-	golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa
+	golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa // indirect
 	golang.org/x/net v0.38.0 // indirect
 	golang.org/x/sys v0.31.0
 	golang.org/x/term v0.30.0

filename: template/template.go
patch: @@ -6,6 +6,7 @@ import (
 	"encoding/json"
 	"errors"
 	"io"
+	"maps"
 	"math"
 	"slices"
 	"strings"
@@ -14,7 +15,6 @@ import (
 	"text/template/parse"
 
 	"github.com/agnivade/levenshtein"
-	"golang.org/x/exp/maps"
 
 	"github.com/ollama/ollama/api"
 )
@@ -157,9 +157,7 @@ func (t *Template) Vars() []string {
 		set[strings.ToLower(n)] = struct{}{}
 	}
 
-	vars = maps.Keys(set)
-	slices.Sort(vars)
-	return vars
+	return slices.Sorted(maps.Keys(set))
 }
 
 type Values struct {