helloadhavan/github_issues huggingface dataset:
Repository: ggml-org/llama.cpp
Pull request: common : add default embeddings presets

This commit adds default embeddings presets for the following models:
- bge-small-en-v1.5
- e5-small-v2
- gte-small

These can be used with llama-embedding and llama-server.

For example, with llama-embedding:
```console
./build/bin/llama-embedding --embd-gte-small-default -p "Hello, how are you?"
```

And with llama-server:
```console
./build/bin/llama-server --embd-gte-small-default
```
And the embeddings endpoint can then be called with a POST request:
```console
curl --request POST \
    --url http://localhost:8080/embeddings \
    --header "Content-Type: application/json" \
    --data '{"input": "Hello, how are you?"}'
```

I'm not sure if these are the most common embedding models but hopefully this can be a good starting point for discussion and further improvements.

Refs: https://github.com/ggerganov/llama.cpp/issues/10932


Changed files:
filename: common/arg.cpp
patch: @@ -2324,5 +2324,47 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
         }
     ).set_examples({LLAMA_EXAMPLE_TTS}));
 
+    add_opt(common_arg(
+        {"--embd-bge-small-en-default"},
+        string_format("use default bge-small-en-v1.5 model (note: can download weights from the internet)"),
+        [](common_params & params) {
+            params.hf_repo = "ggml-org/bge-small-en-v1.5-Q8_0-GGUF";
+            params.hf_file = "bge-small-en-v1.5-q8_0.gguf";
+            params.pooling_type = LLAMA_POOLING_TYPE_NONE;
+            params.embd_normalize = 2;
+            params.n_ctx = 512;
+            params.verbose_prompt = true;
+            params.embedding = true;
+        }
+    ).set_examples({LLAMA_EXAMPLE_EMBEDDING, LLAMA_EXAMPLE_SERVER}));
+
+    add_opt(common_arg(
+        {"--embd-e5-small-en-default"},
+        string_format("use default e5-small-v2 model (note: can download weights from the internet)"),
+        [](common_params & params) {
+            params.hf_repo = "ggml-org/e5-small-v2-Q8_0-GGUF";
+            params.hf_file = "e5-small-v2-q8_0.gguf";
+            params.pooling_type = LLAMA_POOLING_TYPE_NONE;
+            params.embd_normalize = 2;
+            params.n_ctx = 512;
+            params.verbose_prompt = true;
+            params.embedding = true;
+        }
+    ).set_examples({LLAMA_EXAMPLE_EMBEDDING, LLAMA_EXAMPLE_SERVER}));
+
+    add_opt(common_arg(
+        {"--embd-gte-small-default"},
+        string_format("use default gte-small model (note: can download weights from the internet)"),
+        [](common_params & params) {
+            params.hf_repo = "ggml-org/gte-small-Q8_0-GGUF";
+            params.hf_file = "gte-small-q8_0.gguf";
+            params.pooling_type = LLAMA_POOLING_TYPE_NONE;
+            params.embd_normalize = 2;
+            params.n_ctx = 512;
+            params.verbose_prompt = true;
+            params.embedding = true;
+        }
+    ).set_examples({LLAMA_EXAMPLE_EMBEDDING, LLAMA_EXAMPLE_SERVER}));
+
     return ctx_arg;
 }
Repository: electron/electron
Pull request: fix: chrome.i18n unavailable in extension service workers

#### Description of Change

The `chrome.i18n` API has moved into `//extensions`
https://chromium-review.googlesource.com/c/chromium/src/+/3362491

Our manifest was preventing it from being included in extension service workers. I also sorted the APIs alphabetically as that's how it's organized upstream.

cc @codebytere 

#### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [x] PR description included and stakeholders cc'd
- [ ] `npm test` passes
- [ ] tests are [changed or added](https://github.com/electron/electron/blob/main/docs/development/testing.md)
- [ ] relevant documentation, tutorials, templates and examples are changed or added
- [ ] [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 `chrome.i18n` extension API being unavailable in service workers.


Changed files:
filename: shell/common/extensions/api/_api_features.json
patch: @@ -24,20 +24,6 @@
   "action.setBadgeTextColor": {
     "channel": "stable"
   },
-  "tabs": {
-    "channel": "stable",
-    "extension_types": ["extension"],
-    "contexts": ["privileged_extension"]
-  },
-  "tabs.executeScript": {
-    "max_manifest_version": 2
-  },
-  "tabs.insertCSS": {
-    "max_manifest_version": 2
-  },
-  "tabs.removeCSS": {
-    "max_manifest_version": 2
-  },
   "extension": {
     "channel": "stable",
     "extension_types": ["extension"],
@@ -59,12 +45,6 @@
     ],
     "max_manifest_version": 2
   },
-  "i18n": {
-    "channel": "stable",
-    "extension_types": ["extension"],
-    "contexts": ["privileged_extension", "unprivileged_extension", "content_script"],
-    "disallow_for_service_workers": true
-  },
   "mimeHandlerViewGuestInternal": {
     "internal": true,
     "contexts": "all",
@@ -93,5 +73,19 @@
     "channel": "trunk",
     "dependencies": ["permission:scripting"],
     "contexts": ["content_script"]
+  },
+  "tabs": {
+    "channel": "stable",
+    "extension_types": ["extension"],
+    "contexts": ["privileged_extension"]
+  },
+  "tabs.executeScript": {
+    "max_manifest_version": 2
+  },
+  "tabs.insertCSS": {
+    "max_manifest_version": 2
+  },
+  "tabs.removeCSS": {
+    "max_manifest_version": 2
   }
 }
Repository: denoland/deno
Pull request: fix(lint): disable incremental caching if JS plugins are used

Ref https://github.com/denoland/deno/issues/28025

Changed files:
filename: cli/tools/lint/mod.rs
patch: @@ -295,8 +295,9 @@ impl WorkspaceLinter {
     )?;
     let mut maybe_incremental_cache = None;
 
-    // TODO(bartlomieju): how do we decide if plugins support incremental cache?
-    if lint_rules.supports_incremental_cache() {
+    // TODO(bartlomieju): for now we don't support incremental caching if plugins are being used.
+    // https://github.com/denoland/deno/issues/28025
+    if lint_rules.supports_incremental_cache() && plugin_specifiers.is_empty() {
       let mut hasher = FastInsecureHasher::new_deno_versioned();
       hasher.write_hashable(lint_rules.incremental_cache_state());
       if !plugin_specifiers.is_empty() {
Repository: ggml-org/llama.cpp
Pull request: simple : update name of executable to llama-simple [no ci]

This commit updates the name of the executable in README.md from `simple` to `llama-simple`.



- [x] I have read the [contributing guidelines](https://github.com/ggerganov/llama.cpp/blob/master/CONTRIBUTING.md)
- Self-reported review complexity:
  - [x] Low
  - [ ] Medium
  - [ ] High


Changed files:
filename: examples/simple/README.md
patch: @@ -3,7 +3,7 @@
 The purpose of this example is to demonstrate a minimal usage of llama.cpp for generating text with a given prompt.
 
 ```bash
-./simple -m ./models/llama-7b-v2/ggml-model-f16.gguf -p "Hello my name is"
+./llama-simple -m ./models/llama-7b-v2/ggml-model-f16.gguf -p "Hello my name is"
 
 ...
Repository: nodejs/node
Pull request: doc: add back mention of visa fees to onboarding doc

Thanks to the incredible support from the community in https://github.com/openjs-foundation/cross-project-council/issues/1240 we were able to amend the OpenJS Foundation travel fund policy to now cover visa costs (even in case the visa is denied).

<!--
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: onboarding.md
patch: @@ -261,8 +261,9 @@ needs to be pointed out separately during the onboarding.
 * The OpenJS Foundation hosts regular summits for active contributors to the
   Node.js project, where we have face-to-face discussions about our work on the
   project. The Foundation has travel funds to cover [participants' expenses][]
-  including accommodations and transportation if needed. Check out
-  the [summit](https://github.com/nodejs/summit) repository for details.
+  including accommodations, transportation, and visa fees (even in case the visa
+  is denied) if needed. Check out the [summit](https://github.com/nodejs/summit)
+  repository for details.
 * If you are interested in helping to fix coverity reports consider requesting
   access to the projects coverity project as outlined in [static-analysis][].
Repository: denoland/deno
Pull request: fix(lint): clear plugin diagnostics on each lint file run

This clears the diagnostics whenever a file is about to run. For example, what could previously occur is an error and the diagnostics would be leftover from the previous run.

Changed files:
filename: cli/ops/lint.rs
patch: @@ -60,23 +60,18 @@ pub struct LintPluginContainer {
 }
 
 impl LintPluginContainer {
-  pub fn set_cancellation_token(
-    &mut self,
-    maybe_token: Option<CancellationToken>,
-  ) {
-    let token = maybe_token.unwrap_or_default();
-    self.token = token;
-  }
-
   pub fn set_info_for_file(
     &mut self,
     specifier: ModuleSpecifier,
     source_text_info: SourceTextInfo,
     utf16_map: Utf16Map,
+    maybe_token: Option<CancellationToken>,
   ) {
     self.specifier = Some(specifier);
     self.utf_16_map = Some(utf16_map);
     self.source_text_info = Some(source_text_info);
+    self.diagnostics.clear();
+    self.token = maybe_token.unwrap_or_default();
   }
 
   fn report(

filename: cli/tools/lint/plugins.rs
patch: @@ -19,6 +19,7 @@ use deno_core::resolve_url_or_path;
 use deno_core::v8;
 use deno_core::PollEventLoopOptions;
 use deno_lint::diagnostic::LintDiagnostic;
+use deno_path_util::url_from_file_path;
 use deno_runtime::deno_permissions::Permissions;
 use deno_runtime::deno_permissions::PermissionsContainer;
 use deno_runtime::tokio_util;
@@ -322,11 +323,11 @@ impl PluginHost {
       let mut state = state.borrow_mut();
       let container = state.borrow_mut::<LintPluginContainer>();
       container.set_info_for_file(
-        ModuleSpecifier::from_file_path(file_path).unwrap(),
+        url_from_file_path(file_path)?,
         source_text_info,
         utf16_map,
+        maybe_token,
       );
-      container.set_cancellation_token(maybe_token);
     }
 
     let scope = &mut self.worker.js_runtime.handle_scope();
Repository: ggml-org/llama.cpp
Pull request: ggml : skip intermediate .air file when compiling .metallib

This commit updates the compilation of `default.metallib` to skip the intermediate .air (Apple Intermediate Representation) file.

The motivation for this change is to simplify the custom command a little and avoid generating and then removing the .air file.


Changed files:
filename: ggml/src/ggml-metal/CMakeLists.txt
patch: @@ -88,9 +88,8 @@ else()
 
     add_custom_command(
         OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/default.metallib
-        COMMAND xcrun -sdk macosx metal    ${XC_FLAGS} -c ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ggml-metal.metal -o ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ggml-metal.air
-        COMMAND xcrun -sdk macosx metallib                ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ggml-metal.air   -o ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/default.metallib
-        COMMAND rm -f ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ggml-metal.air
+        COMMAND xcrun -sdk macosx metal ${XC_FLAGS} -c ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ggml-metal.metal -o - |
+            xcrun -sdk macosx metallib - -o ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/default.metallib
         COMMAND rm -f ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ggml-common.h
         COMMAND rm -f ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ggml-metal.metal
         DEPENDS ggml-metal.metal ${METALLIB_COMMON}
Repository: electron/electron
Pull request: fix: chrome.i18n unavailable in extension service workers

Backport of #45031

See that PR for details.


Notes: Fixed `chrome.i18n` extension API being unavailable in service workers.


Changed files:
filename: shell/common/extensions/api/_api_features.json
patch: @@ -24,20 +24,6 @@
   "action.setBadgeTextColor": {
     "channel": "stable"
   },
-  "tabs": {
-    "channel": "stable",
-    "extension_types": ["extension"],
-    "contexts": ["privileged_extension"]
-  },
-  "tabs.executeScript": {
-    "max_manifest_version": 2
-  },
-  "tabs.insertCSS": {
-    "max_manifest_version": 2
-  },
-  "tabs.removeCSS": {
-    "max_manifest_version": 2
-  },
   "extension": {
     "channel": "stable",
     "extension_types": ["extension"],
@@ -59,12 +45,6 @@
     ],
     "max_manifest_version": 2
   },
-  "i18n": {
-    "channel": "stable",
-    "extension_types": ["extension"],
-    "contexts": ["privileged_extension", "unprivileged_extension", "content_script"],
-    "disallow_for_service_workers": true
-  },
   "mimeHandlerViewGuestInternal": {
     "internal": true,
     "contexts": "all",
@@ -93,5 +73,19 @@
     "channel": "trunk",
     "dependencies": ["permission:scripting"],
     "contexts": ["content_script"]
+  },
+  "tabs": {
+    "channel": "stable",
+    "extension_types": ["extension"],
+    "contexts": ["privileged_extension"]
+  },
+  "tabs.executeScript": {
+    "max_manifest_version": 2
+  },
+  "tabs.insertCSS": {
+    "max_manifest_version": 2
+  },
+  "tabs.removeCSS": {
+    "max_manifest_version": 2
   }
 }
Repository: denoland/deno
Pull request: perf(compile): use bytes already in memory after downloading executable

Not sure if this will help https://github.com/denoland/deno/issues/27988 but it's better anyway.

Changed files:
filename: cli/standalone/binary.rs
patch: @@ -16,6 +16,7 @@ use capacity_builder::BytesAppendable;
 use deno_ast::MediaType;
 use deno_ast::ModuleKind;
 use deno_ast::ModuleSpecifier;
+use deno_cache_dir::CACHE_PERM;
 use deno_core::anyhow::bail;
 use deno_core::anyhow::Context;
 use deno_core::error::AnyError;
@@ -46,6 +47,7 @@ use deno_lib::util::hash::FastInsecureHasher;
 use deno_lib::version::DENO_VERSION_INFO;
 use deno_npm::resolution::SerializedNpmResolutionSnapshot;
 use deno_npm::NpmSystemInfo;
+use deno_path_util::fs::atomic_write_file_with_retries;
 use deno_path_util::url_from_directory_path;
 use deno_path_util::url_to_file_path;
 use deno_resolver::workspace::WorkspaceResolver;
@@ -285,17 +287,17 @@ impl<'a> DenoCompileBinaryWriter<'a> {
     let download_directory = self.deno_dir.dl_folder_path();
     let binary_path = download_directory.join(&binary_path_suffix);
 
-    if !binary_path.exists() {
-      self
-        .download_base_binary(&download_directory, &binary_path_suffix)
-        .await
-        .context("Setting up base binary.")?;
-    }
-
     let read_file = |path: &Path| -> Result<Vec<u8>, AnyError> {
       std::fs::read(path).with_context(|| format!("Reading {}", path.display()))
     };
-    let archive_data = read_file(&binary_path)?;
+    let archive_data = if binary_path.exists() {
+      read_file(&binary_path)?
+    } else {
+      self
+        .download_base_binary(&binary_path, &binary_path_suffix)
+        .await
+        .context("Setting up base binary.")?
+    };
     let temp_dir = tempfile::TempDir::new()?;
     let base_binary_path = archive::unpack_into_dir(archive::UnpackArgs {
       exe_name: "denort",
@@ -311,9 +313,9 @@ impl<'a> DenoCompileBinaryWriter<'a> {
 
   async fn download_base_binary(
     &self,
-    output_directory: &Path,
+    output_path: &Path,
     binary_path_suffix: &str,
-  ) -> Result<(), AnyError> {
+  ) -> Result<Vec<u8>, AnyError> {
     let download_url = format!("https://dl.deno.land/{binary_path_suffix}");
     let maybe_bytes = {
       let progress_bars = ProgressBar::new(ProgressBarStyle::DownloadBars);
@@ -340,12 +342,15 @@ impl<'a> DenoCompileBinaryWriter<'a> {
       std::fs::create_dir_all(dir)
         .with_context(|| format!("Creating {}", dir.display()))
     };
-    create_dir_all(output_directory)?;
-    let output_path = output_directory.join(binary_path_suffix);
     create_dir_all(output_path.parent().unwrap())?;
-    std::fs::write(&output_path, bytes)
-      .with_context(|| format!("Writing {}", output_path.display()))?;
-    Ok(())
+    atomic_write_file_with_retries(
+      &CliSys::default(),
+      output_path,
+      &bytes,
+      CACHE_PERM,
+    )
+    .with_context(|| format!("Writing {}", output_path.display()))?;
+    Ok(bytes)
   }
 
   /// This functions creates a standalone deno binary by appending a bundle
Repository: facebook/react
Pull request: [Fizz] Gracefully handle suspending in DOM configs

E.g. if we suspend (throw a promise) in pushStartInstance today we might have already pushed some chunks (or even child segments potentially). We should revert back to where we were.

This doesn't usually happen because when we suspend in a component it doesn't write anything itself, it'll always defer to som host instance to do the writing.

There was a todo about this already but I'm not 100% sure it's always safe when suspending. It should be safe when suspending just regularly because it's just a noop. We might not even want "throwing a promise" in this mechanism to be supported longer term but for now that's how a suspend in internals.

Changed files:
filename: packages/react-server/src/ReactFizzServer.js
patch: @@ -1603,8 +1603,11 @@ function spawnNewSuspendedTask(
 // This is a non-destructive form of rendering a node. If it suspends it spawns
 // a new task and restores the context of this task to what it was before.
 function renderNode(request: Request, task: Task, node: ReactNodeList): void {
-  // TODO: Store segment.children.length here and reset it in case something
+  // Store how much we've pushed at this point so we can reset it in case something
   // suspended partially through writing something.
+  const segment = task.blockedSegment;
+  const childrenLength = segment.children.length;
+  const chunkLength = segment.chunks.length;
 
   // Snapshot the current context in case something throws to interrupt the
   // process.
@@ -1620,6 +1623,10 @@ function renderNode(request: Request, task: Task, node: ReactNodeList): void {
   } catch (thrownValue) {
     resetHooksState();
 
+    // Reset the write pointers to where we started.
+    segment.children.length = childrenLength;
+    segment.chunks.length = chunkLength;
+
     const x =
       thrownValue === SuspenseException
         ? // This is a special type of exception used for Suspense. For historical
@@ -1895,6 +1902,9 @@ function retryTask(request: Request, task: Task): void {
     prevTaskInDEV = currentTaskInDEV;
     currentTaskInDEV = task;
   }
+
+  const childrenLength = segment.children.length;
+  const chunkLength = segment.chunks.length;
   try {
     // We call the destructive form that mutates this task. That way if something
     // suspends again, we can reuse the same task instead of spawning a new one.
@@ -1919,6 +1929,10 @@ function retryTask(request: Request, task: Task): void {
   } catch (thrownValue) {
     resetHooksState();
 
+    // Reset the write pointers to where we started.
+    segment.children.length = childrenLength;
+    segment.chunks.length = chunkLength;
+
     const x =
       thrownValue === SuspenseException
         ? // This is a special type of exception used for Suspense. For historical
Repository: vercel/next.js
Pull request: [segment-explorer] Fix segment alignment

[CleanShot 2025-06-23 at 12.50.50.mp4 <span class="graphite__hidden">(uploaded via Graphite)</span> <img class="graphite__hidden" src="https://app.graphite.dev/api/v1/graphite/video/thumbnail/dLGs20hkgfWzupsPjSxb/086813e0-cd2e-4871-b30e-7be0d72bbfd3.mp4" />](https://app.graphite.dev/media/video/dLGs20hkgfWzupsPjSxb/086813e0-cd2e-4871-b30e-7be0d72bbfd3.mp4)



Changed files:
filename: packages/next/src/next-devtools/dev-overlay/components/overview/segment-explorer.tsx
patch: @@ -236,7 +236,6 @@ export const DEV_TOOLS_INFO_RENDER_FILES_STYLES = css`
     padding: 2px 6px;
     border-radius: 16px;
     font-size: var(--size-12);
-    line-height: 16px;
     font-weight: 500;
     user-select: none;
   }
Repository: ggml-org/llama.cpp
Pull request: llama : use reserve/emplace_back in sampler_sample

This commit updates the llama_sampler_sample function to use reserve and emplace_back for the vector of llama_token_data structs.

The motivation for this change is to avoid the creation of n_vocab default-constructed llama_token_data structs which are then immediately overwritten.



- [x] I have read the [contributing guidelines](https://github.com/ggerganov/llama.cpp/blob/master/CONTRIBUTING.md)
- Self-reported review complexity:
  - [x] Low
  - [ ] Medium
  - [ ] High


Changed files:
filename: src/llama-sampling.cpp
patch: @@ -236,9 +236,10 @@ llama_token llama_sampler_sample(struct llama_sampler * smpl, struct llama_conte
     const int n_vocab = llama_n_vocab(llama_get_model(ctx));
 
     // TODO: do not allocate each time
-    std::vector<llama_token_data> cur(n_vocab);
+    std::vector<llama_token_data> cur;
+    cur.reserve(n_vocab);
     for (llama_token token_id = 0; token_id < n_vocab; token_id++) {
-        cur[token_id] = llama_token_data{token_id, logits[token_id], 0.0f};
+        cur.emplace_back(llama_token_data{token_id, logits[token_id], 0.0f});
     }
 
     llama_token_data_array cur_p = {