helloadhavan/github_issues huggingface dataset:
Repository: ggml-org/llama.cpp
Pull request: perplexity : show more kl-divergence data

Adds additional percentile data for displayed in the output of `llama-perplexity --kl-divergence`:
- Added 95 percentile (mirroring existing 5 percentile)
- Added 0.1 percentile (mirroring existing 99.9 percentile)

*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,11 +1931,13 @@ 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("95.0%%   KLD: %10.6f\n", percentile(kld_values, 0.950f));
     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));
     LOG(" 1.0%%   KLD: %10.6f\n", percentile(kld_values, 0.010f));
+    LOG(" 0.1%%   KLD: %10.6f\n", percentile(kld_values, 0.001f));
     LOG("Minimum KLD: %10.6f\n", kld_values.front());
 
     LOG("\n");
Repository: ollama/ollama
Pull request: more free


Changed files:
filename: llama/llama.go
patch: @@ -81,13 +81,22 @@ func (l *LLama) Eval(text string, opts ...PredictOption) error {
 		defer C.free(unsafe.Pointer(cs))
 	}
 
+	cLogitBias := C.CString(po.LogitBias)
+	defer C.free(unsafe.Pointer(cLogitBias))
+
+	cMainGPU := C.CString(po.MainGPU)
+	defer C.free(unsafe.Pointer(cMainGPU))
+
+	cTensorSplit := C.CString(po.TensorSplit)
+	defer C.free(unsafe.Pointer(cTensorSplit))
+
 	params := C.llama_allocate_params(input, C.int(po.Seed), C.int(po.Threads), C.int(po.Tokens), C.int(po.TopK),
 		C.float(po.TopP), C.float(po.Temperature), C.float(po.Penalty), C.int(po.Repeat),
 		C.bool(po.IgnoreEOS), C.bool(po.F16KV),
 		C.int(po.Batch), C.int(po.NKeep), pass, C.int(reverseCount),
 		C.float(po.TailFreeSamplingZ), C.float(po.TypicalP), C.float(po.FrequencyPenalty), C.float(po.PresencePenalty),
-		C.int(po.Mirostat), C.float(po.MirostatETA), C.float(po.MirostatTAU), C.bool(po.PenalizeNL), C.CString(po.LogitBias),
-		C.bool(po.MLock), C.bool(po.MMap), C.CString(po.MainGPU), C.CString(po.TensorSplit),
+		C.int(po.Mirostat), C.float(po.MirostatETA), C.float(po.MirostatTAU), C.bool(po.PenalizeNL), cLogitBias,
+		C.bool(po.MLock), C.bool(po.MMap), cMainGPU, cTensorSplit,
 	)
 	defer C.llama_free_params(params)
Repository: facebook/react
Pull request: Remove ReactTestUtils from ReactJSXTransformIntegration


Changed files:
filename: packages/react/src/__tests__/ReactJSXTransformIntegration-test.js
patch: @@ -11,7 +11,6 @@
 
 let React;
 let ReactDOMClient;
-let ReactTestUtils;
 let act;
 
 // TODO: Historically this module was used to confirm that the JSX transform
@@ -30,7 +29,6 @@ describe('ReactJSXTransformIntegration', () => {
 
     React = require('react');
     ReactDOMClient = require('react-dom/client');
-    ReactTestUtils = require('react-dom/test-utils');
     act = require('internal-test-utils').act;
 
     Component = class extends React.Component {
@@ -213,22 +211,34 @@ describe('ReactJSXTransformIntegration', () => {
     expect(instance.props.fruit).toBe('persimmon');
   });
 
-  it('should normalize props with default values', () => {
+  it('should normalize props with default values', async () => {
     class NormalizingComponent extends React.Component {
       render() {
         return <span>{this.props.prop}</span>;
       }
     }
     NormalizingComponent.defaultProps = {prop: 'testKey'};
 
-    const instance = ReactTestUtils.renderIntoDocument(
-      <NormalizingComponent />,
-    );
+    let container = document.createElement('div');
+    let root = ReactDOMClient.createRoot(container);
+    let instance;
+    await act(() => {
+      root.render(
+        <NormalizingComponent ref={current => (instance = current)} />,
+      );
+    });
+
     expect(instance.props.prop).toBe('testKey');
 
-    const inst2 = ReactTestUtils.renderIntoDocument(
-      <NormalizingComponent prop={null} />,
-    );
+    container = document.createElement('div');
+    root = ReactDOMClient.createRoot(container);
+    let inst2;
+    await act(() => {
+      root.render(
+        <NormalizingComponent prop={null} ref={current => (inst2 = current)} />,
+      );
+    });
+
     expect(inst2.props.prop).toBe(null);
   });
 });
Repository: nodejs/node
Pull request: fix(node_http2.cc): remove duplicate codeblock

<!--
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.
-->

Original bug was introduced in here: https://github.com/nodejs/node/pull/55155/files#diff-33f026e43570112875cf4c8eab6743496f3aa014329611128e348ec23d6f771cL1303-R1313
Doesn't seem like that it actually leads to any problems, except extra memcpy


Changed files:
filename: src/node_http2.cc
patch: @@ -1316,11 +1316,7 @@ int Http2Session::OnDataChunkReceived(nghttp2_session* handle,
     } else {
       memcpy(buf.base, data, avail);
     }
-    if (buf.base == nullptr) [[likely]] {
-      buf.base = reinterpret_cast<char*>(const_cast<uint8_t*>(data));
-    } else {
-      memcpy(buf.base, data, avail);
-    }
+
     data += avail;
     len -= avail;
     stream->EmitRead(avail, buf);
Repository: ollama/ollama
Pull request: fix prompt templates

lower values are better

Changed files:
filename: server/routes.go
patch: @@ -6,6 +6,7 @@ import (
 	"fmt"
 	"io"
 	"log"
+	"math"
 	"net"
 	"net/http"
 	"path"
@@ -48,7 +49,7 @@ func generate(c *gin.Context) {
 		templateNames = append(templateNames, template.Name())
 	}
 
-	match, _ := matchRankOne(path.Base(req.Prompt), templateNames)
+	match, _ := matchRankOne(path.Base(req.Model), templateNames)
 	if template := templates.Lookup(match); template != nil {
 		var sb strings.Builder
 		if err := template.Execute(&sb, req); err != nil {
@@ -146,8 +147,9 @@ func Serve(ln net.Listener) error {
 }
 
 func matchRankOne(source string, targets []string) (bestMatch string, bestRank int) {
+	bestRank = math.MaxInt
 	for _, target := range targets {
-		if rank := fuzzy.LevenshteinDistance(source, target); bestRank < rank {
+		if rank := fuzzy.LevenshteinDistance(source, target); bestRank > rank {
 			bestRank = rank
 			bestMatch = target
 		}
Repository: ggml-org/llama.cpp
Pull request: test-barrier : do not use more threads than physically available

Attempt to fix macOS-latest-cmake-arm64 as suggested https://github.com/ggml-org/llama.cpp/pull/16388#issuecomment-3360688928

Changed files:
filename: tests/test-barrier.cpp
patch: @@ -1,19 +1,19 @@
 #include "ggml.h"
 #include "ggml-cpu.h"
-#include "ggml-backend.h"
 
 #include <chrono>
 #include <iostream>
 #include <cstdio>
 #include <cstdlib>
 #include <cassert>
 #include <vector>
+#include <thread>
 
 #define MAX_NARGS 2
 
 int main(int argc, char *argv[]) {
 
-    int n_threads = 4;
+    int n_threads = std::max(1, std::min(4, (int) std::thread::hardware_concurrency()));
     int n_rounds  = 100;
 
     if (argc > 1) {
Repository: ollama/ollama
Pull request: Go simple response


Changed files:
filename: api/client.go
patch: @@ -8,7 +8,6 @@ import (
 	"fmt"
 	"io"
 	"net/http"
-	"strings"
 	"sync"
 )
 
@@ -140,20 +139,8 @@ func (c *Client) Pull(ctx context.Context, req *PullRequest, callback func(progr
 	var wg sync.WaitGroup
 	wg.Add(1)
 	if err := c.stream(ctx, http.MethodPost, "/api/pull", req, func(progressBytes []byte) {
-		/*
-			Events have the following format for progress:
-				event:progress
-				data:{"total":123,"completed":123,"percent":0.1}
-			Need to parse out the data part and unmarshal it.
-		*/
-		eventParts := strings.Split(string(progressBytes), "data:")
-		if len(eventParts) < 2 {
-			// no data part, ignore
-			return
-		}
-		eventData := eventParts[1]
 		var progress PullProgress
-		if err := json.Unmarshal([]byte(eventData), &progress); err != nil {
+		if err := json.Unmarshal(progressBytes, &progress); err != nil {
 			fmt.Println(err)
 			return
 		}

filename: api/types.go
patch: @@ -36,11 +36,3 @@ type GenerateRequest struct {
 type GenerateResponse struct {
 	Response string `json:"response"`
 }
-
-type TokenResponse struct {
-	Choices []TokenResponseChoice `json:"choices"`
-}
-
-type TokenResponseChoice struct {
-	Text string `json:"text"`
-}

filename: server/routes.go
patch: @@ -78,12 +78,8 @@ func generate(c *gin.Context) {
 			return false
 		}
 
-		resp := api.TokenResponse{
-			Choices: []api.TokenResponseChoice{
-				{
-					Text: token,
-				},
-			},
+		resp := api.GenerateResponse{
+			Response: token,
 		}
 
 		bts, err := json.Marshal(resp)
@@ -124,7 +120,17 @@ func Serve(ln net.Listener) error {
 			if !ok {
 				return false
 			}
-			c.SSEvent("progress", progress)
+
+			bts, err := json.Marshal(progress)
+			if err != nil {
+				return false
+			}
+
+			bts = append(bts, '\n')
+			if _, err := w.Write(bts); err != nil {
+				return false
+			}
+
 			return true
 		})
 	})
Repository: ggml-org/llama.cpp
Pull request: ci: update vulkan ci

The Ubuntu Vulkan SDK package is being discontinued, so I switched that to the generic one. I also made a couple changes to make it run faster (new llvmpipe and FP32 tests as that's easier for the CPU to run).

Changed files:
filename: .github/workflows/build.yml
patch: @@ -387,8 +387,8 @@ jobs:
           cd build
           ctest -L main --verbose
 
-  ubuntu-22-cmake-vulkan:
-    runs-on: ubuntu-22.04
+  ubuntu-24-cmake-vulkan:
+    runs-on: ubuntu-24.04
 
     steps:
       - name: Clone
@@ -398,20 +398,40 @@ jobs:
       - name: ccache
         uses: ggml-org/ccache-action@v1.2.16
         with:
-          key: ubuntu-22-cmake-vulkan
+          key: ubuntu-24-cmake-vulkan
           evict-old-files: 1d
 
       - name: Dependencies
         id: depends
         run: |
-          wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
-          sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list https://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list
+          sudo add-apt-repository -y ppa:kisak/kisak-mesa
           sudo apt-get update -y
-          sudo apt-get install -y build-essential mesa-vulkan-drivers vulkan-sdk libcurl4-openssl-dev
+          sudo apt-get install -y build-essential mesa-vulkan-drivers libxcb-xinput0 libxcb-xinerama0 libxcb-cursor-dev libcurl4-openssl-dev
+
+      - name: Get latest Vulkan SDK version
+        id: vulkan_sdk_version
+        run: |
+          echo "VULKAN_SDK_VERSION=$(curl https://vulkan.lunarg.com/sdk/latest/linux.txt)" >> "$GITHUB_ENV"
+
+      - name: Cache Vulkan SDK
+        id: cache_vulkan_sdk
+        uses: actions/cache@v4
+        with:
+          path: ./vulkan_sdk
+          key: vulkan-sdk-${{ env.VULKAN_SDK_VERSION }}-${{ runner.os }}
+
+      - name: Install Vulkan SDK
+        if: steps.cache_vulkan_sdk.outputs.cache-hit != 'true'
+        id: vulkan_sdk_install
+        run: |
+          mkdir -p vulkan_sdk
+          cd vulkan_sdk
+          curl --no-progress-meter https://sdk.lunarg.com/sdk/download/latest/linux/vulkan_sdk.tar.xz | tar -Jx --strip-components=1
 
       - name: Build
         id: cmake_build
         run: |
+          source ./vulkan_sdk/setup-env.sh
           cmake -B build \
             -DGGML_VULKAN=ON
           cmake --build build --config Release -j $(nproc)
@@ -421,6 +441,7 @@ jobs:
         run: |
           cd build
           export GGML_VK_VISIBLE_DEVICES=0
+          export GGML_VK_DISABLE_F16=1
           # This is using llvmpipe and runs slower than other backends
           ctest -L main --verbose --timeout 4200
Repository: huggingface/transformers
Pull request: Fix missing video inputs for PerceptionLM.


Critical: Fixes missing video input for PerceptionLM (accidentally removed in [PR](https://github.com/huggingface/transformers/pull/39583))

Minor: Add support for vanilla image that only has C,H,W dims but not tiles dim.
This is non-default image shapes used in PLM but it's useful in demos and low-resoure devices.
e.g., in just added  "PLM Simple Fine-tuning Example" under
https://huggingface.co/facebook/Perception-LM-1B#plm-usage






Changed files:
filename: src/transformers/models/perception_lm/processing_perception_lm.py
patch: @@ -170,7 +170,7 @@ def __call__(
             mm_token_type_ids[array_ids == self.image_token_id] = 1
             text_inputs["mm_token_type_ids"] = mm_token_type_ids.tolist()
 
-        return BatchFeature(data={**text_inputs, **image_inputs}, tensor_type=return_tensors)
+        return BatchFeature(data={**text_inputs, **image_inputs, **videos_inputs}, tensor_type=return_tensors)
 
     def _expand_media_tokens(self, sample, media_token: str, media_iter: Iterable):
         media_count = sample.count(media_token)
Repository: denoland/deno
Pull request: feat: Deno.execPath() no longer requires --allow-read permission

This commit changes `Deno.execPath()` API to no longer require
read permission.

This change is dictated by the fact that in common scenarios, requiring
read permission is less secure than not requiring permissions - if
a user wants to spawn a Deno subprocess using the current executable,
they would do something like:

```
new Deno.Command(Deno.execPath(), { args: ["eval", "1+1"] }).outputSync();
```

To run this program, currently one needs to pass `--allow-read --allow-run=deno` flags.
It's possible to limit scope of `--allow-read` flag, but it's really cumbersome to do,
so most users will opt to give a blanket `--allow-read` permission.

Not requiring read permissions allows the above program to be run with
just `--allow-run=deno` flag.

This change is in similar to relaxing of permissions in `Deno.cwd()` API done
in https://github.com/denoland/deno/pull/27192.

Ref https://github.com/denoland/deno/issues/20061#issuecomment-2942497783

Changed files:
filename: cli/tsc/dts/lib.deno.ns.d.ts
patch: @@ -1591,9 +1591,6 @@ declare namespace Deno {
    * console.log(Deno.execPath());  // e.g. "/home/alice/.local/bin/deno"
    * ```
    *
-   * Requires `allow-read` permission.
-   *
-   * @tags allow-read
    * @category Runtime
    */
   export function execPath(): string;

filename: ext/os/lib.rs
patch: @@ -113,13 +113,10 @@ pub enum OsError {
   Io(#[from] std::io::Error),
 }
 
-#[op2(stack_trace)]
+#[op2]
 #[string]
-fn op_exec_path(state: &mut OpState) -> Result<String, OsError> {
+fn op_exec_path() -> Result<String, OsError> {
   let current_exe = env::current_exe().unwrap();
-  state
-    .borrow_mut::<PermissionsContainer>()
-    .check_read_blind(&current_exe, "exec_path", "Deno.execPath()")?;
   // normalize path so it doesn't include '.' or '..' components
   let path = normalize_path(current_exe);
 

filename: tests/unit/os_test.ts
patch: @@ -184,20 +184,10 @@ Deno.test(
   },
 );
 
-Deno.test({ permissions: { read: true } }, function execPath() {
+Deno.test({ permissions: { read: false } }, function execPath() {
   assertNotEquals(Deno.execPath(), "");
 });
 
-Deno.test({ permissions: { read: false } }, function execPathPerm() {
-  assertThrows(
-    () => {
-      Deno.execPath();
-    },
-    Deno.errors.NotCapable,
-    "Requires read access to <exec_path>, run again with the --allow-read flag",
-  );
-});
-
 Deno.test(
   {
     ignore: Deno.build.os !== "linux",
Repository: vercel/next.js
Pull request: Turbopack: fix dev test manifest

<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the PR.
- Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to understand the PR)
- When linking to a Slack thread, you might want to share details of the conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->


Closes PACK-5156

Changed files:
filename: test/turbopack-dev-tests-manifest.json
patch: @@ -12043,11 +12043,10 @@
       "react-compiler default should render",
       "react-compiler default should show an experimental warning",
       "react-compiler default should work with a library that uses the react-server condition",
+      "react-compiler default should work with a library using use client",
       "react-compiler default throws if the React Compiler is used in a React Server environment"
     ],
-    "failed": [
-      "react-compiler default should work with a library using use client"
-    ],
+    "failed": [],
     "pending": [],
     "flakey": [],
     "runtimeError": false
Repository: electron/electron
Pull request: perf: avoid `std::map` temporaries in `IsDevToolsFileSystemAdded()`

Backport of #46230

See that PR for details.


Notes: none.

Changed files:
filename: shell/browser/api/electron_api_web_contents.cc
patch: @@ -675,13 +675,16 @@ PrefService* GetPrefService(content::WebContents* web_contents) {
   return static_cast<electron::ElectronBrowserContext*>(context)->prefs();
 }
 
+// returns a Dict of filesystem_path -> type
+[[nodiscard]] const base::Value::Dict& GetAddedFileSystems(
+    content::WebContents* web_contents) {
+  return GetPrefService(web_contents)->GetDict(prefs::kDevToolsFileSystemPaths);
+}
+
 std::map<std::string, std::string> GetAddedFileSystemPaths(
     content::WebContents* web_contents) {
-  auto* pref_service = GetPrefService(web_contents);
-  const base::Value::Dict& file_system_paths =
-      pref_service->GetDict(prefs::kDevToolsFileSystemPaths);
   std::map<std::string, std::string> result;
-  for (auto it : file_system_paths) {
+  for (auto it : GetAddedFileSystems(web_contents)) {
     std::string type =
         it.second.is_string() ? it.second.GetString() : std::string();
     result[it.first] = type;
@@ -690,8 +693,8 @@ std::map<std::string, std::string> GetAddedFileSystemPaths(
 }
 
 bool IsDevToolsFileSystemAdded(content::WebContents* web_contents,
-                               const std::string& file_system_path) {
-  return GetAddedFileSystemPaths(web_contents).contains(file_system_path);
+                               const std::string_view file_system_path) {
+  return GetAddedFileSystems(web_contents).contains(file_system_path);
 }
 
 content::RenderFrameHost* GetRenderFrameHost(
Repository: ggml-org/llama.cpp
Pull request: musa: update compile flags

*Make sure to read the [contributing guidelines](https://github.com/ggml-org/llama.cpp/blob/master/CONTRIBUTING.md) before submitting a PR*

This PR introduces a minor performance improvement on MTGPU by applying updated compiler flags. It also addresses build warnings in recently updated files.

Changed files:
filename: ggml/src/ggml-cuda/fattn-vec.cuh
patch: @@ -535,8 +535,6 @@ void ggml_cuda_flash_attn_ext_vec_case(ggml_backend_cuda_context & ctx, ggml_ten
     float logit_softcap;
     memcpy(&logit_softcap, (const float *) KQV->op_params + 2, sizeof(float));
 
-    const int cc = ggml_cuda_info().devices[ggml_cuda_get_device()].cc;
-
     if (Q->ne[1] == 1) {
         constexpr int cols_per_block = 1;
         if (logit_softcap == 0.0f) {

filename: ggml/src/ggml-cuda/topk-moe.cu
patch: @@ -13,7 +13,7 @@
 
     It is intended as fusion of softmax->top-k->get_rows pipeline for MoE models
 */
-template <size_t n_experts, bool with_norm>
+template <int n_experts, bool with_norm>
 __launch_bounds__(4 * WARP_SIZE, 1) __global__ void topk_moe_cuda(const float * logits,
                                                                   float *       weights,
                                                                   int32_t *     ids,
@@ -204,8 +204,6 @@ void ggml_cuda_op_topk_moe(ggml_backend_cuda_context & ctx,
 
     GGML_ASSERT(ids->nb[1] / ggml_type_size(ids->type) == (size_t) n_experts);
 
-    cudaStream_t stream = ctx.stream();
-
     const int n_expert_used = weights->ne[1];
 
     if (with_norm) {

filename: ggml/src/ggml-musa/CMakeLists.txt
patch: @@ -56,7 +56,7 @@ if (MUSAToolkit_FOUND)
 
     set_source_files_properties(${GGML_SOURCES_MUSA} PROPERTIES LANGUAGE CXX)
     foreach(SOURCE ${GGML_SOURCES_MUSA})
-        set(COMPILE_FLAGS "-fsigned-char -x musa -mtgpu")
+        set(COMPILE_FLAGS "-Od3 -fno-strict-aliasing -ffast-math -fsigned-char -x musa -mtgpu -fmusa-flush-denormals-to-zero")
         foreach(ARCH ${MUSA_ARCHITECTURES})
             set(COMPILE_FLAGS "${COMPILE_FLAGS} --cuda-gpu-arch=mp_${ARCH}")
         endforeach()