helloadhavan/github_issues huggingface dataset:
Repository: facebook/react
Pull request: Fix ReactHooksInspection-test.js

## Summary

Currently, `ReactHooksInspection-test.js` fails because something is polluting the resulting `Promise` with symbol properties. This changes the unit test to be more resilient to such symbol properties.

## How did you test this change?

Ran the following successfully:

```
$ yarn test
```

Changed files:
filename: packages/react-debug-tools/src/__tests__/ReactHooksInspection-test.js
patch: @@ -584,24 +584,29 @@ describe('ReactHooksInspection', () => {
       return <div>{value}</div>;
     }
     const tree = ReactDebugTools.inspectHooks(Foo, {});
-    expect(normalizeSourceLoc(tree)).toMatchInlineSnapshot(`
-      [
-        {
-          "debugInfo": null,
-          "hookSource": {
-            "columnNumber": 0,
-            "fileName": "**",
-            "functionName": "Foo",
-            "lineNumber": 0,
-          },
-          "id": null,
-          "isStateEditable": false,
-          "name": "Unresolved",
-          "subHooks": [],
-          "value": Promise {},
+    const results = normalizeSourceLoc(tree);
+    expect(results).toHaveLength(1);
+    expect(results[0]).toMatchInlineSnapshot(
+      {
+        value: expect.any(Promise),
+      },
+      `
+      {
+        "debugInfo": null,
+        "hookSource": {
+          "columnNumber": 0,
+          "fileName": "**",
+          "functionName": "Foo",
+          "lineNumber": 0,
         },
-      ]
-    `);
+        "id": null,
+        "isStateEditable": false,
+        "name": "Unresolved",
+        "subHooks": [],
+        "value": Any<Promise>,
+      }
+    `,
+    );
   });
 
   describe('useDebugValue', () => {
Repository: ollama/ollama
Pull request: tell users to check the server error logs

when possible tell users to check the error logs to get more info on why their command failed

Changed files:
filename: cmd/cmd.go
patch: @@ -275,6 +275,18 @@ func generate(cmd *cobra.Command, model, prompt string) error {
 		}
 
 		if err := client.Generate(context.Background(), &request, fn); err != nil {
+			if strings.Contains(err.Error(), "failed to load model") {
+				// tell the user to check the server log, if it exists locally
+				home, nestedErr := os.UserHomeDir()
+				if nestedErr != nil {
+					// return the original error
+					return err
+				}
+				logPath := filepath.Join(home, ".ollama", "logs", "server.log")
+				if _, nestedErr := os.Stat(logPath); nestedErr == nil {
+					err = fmt.Errorf("%w\nFor more details, check the error logs at %s", err, logPath)
+				}
+			}
 			return err
 		}
Repository: nodejs/node
Pull request: doc: update Xcode version used for arm64 and pkg

<!--
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: BUILDING.md
patch: @@ -163,7 +163,7 @@ Binaries at <https://nodejs.org/download/release/> are produced on:
 | ----------------------- | ------------------------------------------------------------------------------------------------------------- |
 | aix-ppc64               | AIX 7.2 TL04 on PPC64BE with GCC 12[^5]                                                                       |
 | darwin-x64              | macOS 13, Xcode 16 with -mmacosx-version-min=11.0                                                             |
-| darwin-arm64 (and .pkg) | macOS 13 (arm64), Xcode 14 with -mmacosx-version-min=11.0                                                     |
+| darwin-arm64 (and .pkg) | macOS 13 (arm64), Xcode 16 with -mmacosx-version-min=11.0                                                     |
 | linux-arm64             | RHEL 8 with gcc-toolset-12[^6]                                                                                |
 | linux-armv7l            | Cross-compiled on RHEL 9 x64 with a [custom GCC toolchain](https://github.com/rvagg/rpi-newer-crosstools)[^7] |
 | linux-ppc64le           | RHEL 8 with gcc-toolset-12[^6]                                                                                |
Repository: electron/electron
Pull request: perf: avoid 3x call to `GetID()` in RegisterPendingSiteInstance()

Backport of #46339

See that PR for details.


Notes: none.

Changed files:
filename: shell/browser/electron_browser_client.cc
patch: @@ -443,13 +443,13 @@ void ElectronBrowserClient::RegisterPendingSiteInstance(
     content::SiteInstance* pending_site_instance) {
   // Remember the original web contents for the pending renderer process.
   auto* web_contents = content::WebContents::FromRenderFrameHost(rfh);
-  auto* pending_process = pending_site_instance->GetProcess();
-  pending_processes_[pending_process->GetID()] = web_contents;
+  const auto pending_process_id = pending_site_instance->GetProcess()->GetID();
+  pending_processes_[pending_process_id] = web_contents;
 
   if (rfh->GetParent())
-    renderer_is_subframe_.insert(pending_process->GetID());
+    renderer_is_subframe_.insert(pending_process_id);
   else
-    renderer_is_subframe_.erase(pending_process->GetID());
+    renderer_is_subframe_.erase(pending_process_id);
 }
 
 void ElectronBrowserClient::AppendExtraCommandLineSwitches(
Repository: ollama/ollama
Pull request: override ggml-metal if the file is different


Changed files:
filename: llama/llama_darwin.go
patch: @@ -1,6 +1,8 @@
 package llama
 
 import (
+	"bytes"
+	"crypto/sha256"
 	"errors"
 	"io"
 	"log"
@@ -27,26 +29,51 @@ func initBackend() error {
 	}
 
 	metal := filepath.Join(filepath.Dir(exec), "ggml-metal.metal")
-	if _, err := os.Stat(metal); err != nil {
-		if !errors.Is(err, os.ErrNotExist) {
+	fi, err := os.Stat(metal)
+	if err != nil && !errors.Is(err, os.ErrNotExist) {
+		return err
+	}
+
+	if fi != nil {
+		actual, err := os.Open(metal)
+		if err != nil {
 			return err
 		}
 
-		dst, err := os.Create(filepath.Join(filepath.Dir(exec), "ggml-metal.metal"))
-		if err != nil {
+		actualSum := sha256.New()
+		if _, err := io.Copy(actualSum, actual); err != nil {
 			return err
 		}
-		defer dst.Close()
 
-		src, err := fs.Open("ggml-metal.metal")
+		expect, err := fs.Open("ggml-metal.metal")
 		if err != nil {
 			return err
 		}
-		defer src.Close()
 
-		if _, err := io.Copy(dst, src); err != nil {
+		expectSum := sha256.New()
+		if _, err := io.Copy(expectSum, expect); err != nil {
 			return err
 		}
+
+		if bytes.Equal(actualSum.Sum(nil), expectSum.Sum(nil)) {
+			return nil
+		}
+	}
+
+	dst, err := os.Create(filepath.Join(filepath.Dir(exec), "ggml-metal.metal"))
+	if err != nil {
+		return err
+	}
+	defer dst.Close()
+
+	src, err := fs.Open("ggml-metal.metal")
+	if err != nil {
+		return err
+	}
+	defer src.Close()
+
+	if _, err := io.Copy(dst, src); err != nil {
+		return err
 	}
 
 	return nil
Repository: facebook/react
Pull request: Link to reactjs/react.dev repo instead of reactjs/reactjs.org

<!--
  Thanks for submitting a pull request!
  We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory.

  Before submitting a pull request, please make sure the following is done:

  1. Fork [the repository](https://github.com/facebook/react) and create your branch from `main`.
  2. Run `yarn` in the repository root.
  3. If you've fixed a bug or added code that should be tested, add tests!
  4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development.
  5. Run `yarn test --prod` to test in the production environment. It supports the same options as `yarn test`.
  6. If you need a debugger, run `yarn test --debug --watch TestName`, open `chrome://inspect`, and press "Inspect".
  7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`).
  8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files.
  9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`).
  10. If you haven't already, complete the CLA.

  Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html
-->

## Summary

Update document repository link

<!--
 Explain the **motivation** for making this change. What existing problem does the pull request solve?
-->

## How did you test this change?

<!--
  Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface.
  How exactly did you verify that your PR solves the issue you wanted to solve?
  If you leave this empty, your PR will very likely be closed.
-->


Changed files:
filename: README.md
patch: @@ -36,7 +36,7 @@ The documentation is divided into several sections:
 * [Where to Get Support](https://react.dev/community)
 * [Contributing Guide](https://legacy.reactjs.org/docs/how-to-contribute.html)
 
-You can improve it by sending pull requests to [this repository](https://github.com/reactjs/reactjs.org).
+You can improve it by sending pull requests to [this repository](https://github.com/reactjs/react.dev).
 
 ## Examples
Repository: nodejs/node
Pull request: doc: add "Skip to content" button

Useful especially for folks using a screen reader.

WCAG Reference: [WCAG 2.0 Technique G1](https://www.w3.org/TR/WCAG20-TECHS/G1.html)
<!--
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_assets/style.css
patch: @@ -122,6 +122,19 @@ a.type {
   font-size: .9em;
 }
 
+.skip-to-content {
+  position: fixed;
+  top: -300%;
+}
+.skip-to-content:focus {
+  display: block;
+  top: 0;
+  left: 0;
+  background-color: var(--green1);
+  padding: 1rem;
+  z-index: 999999;
+}
+
 #content {
   position: relative;
 }

filename: doc/template.html
patch: @@ -26,6 +26,7 @@
   __JS_FLAVORED_DYNAMIC_CSS__
 </head>
 <body class="alt apidoc" id="api-section-__FILENAME__">
+  <a href="#apicontent" class="skip-to-content">Skip to content</a>
   <div id="content" class="clearfix">
     <div role="navigation" id="column2" class="interior">
       <div id="intro" class="interior">
Repository: denoland/deno
Pull request: fix: reduce change of corrupt lockfile error when updating dependencies in the config file

* https://github.com/denoland/deno_lockfile/pull/55

Changed files:
filename: Cargo.lock
patch: @@ -2296,9 +2296,9 @@ dependencies = [
 
 [[package]]
 name = "deno_lockfile"
-version = "0.31.0"
+version = "0.31.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7049d4f98783353cd2d49eaf74365d76d1dfc24c8b06392e7c255c0515ba5bb7"
+checksum = "c2051c2aecfd7f287c2afdcee50d9e2ac1b8f1873bae2d3934d9a2e2762d7c66"
 dependencies = [
  "async-trait",
  "deno_semver",

filename: Cargo.toml
patch: @@ -67,7 +67,7 @@ deno_doc = "=0.181.0"
 deno_error = "=0.7.0"
 deno_graph = { version = "=0.98.0", default-features = false }
 deno_lint = "=0.77.0"
-deno_lockfile = "=0.31.0"
+deno_lockfile = "=0.31.1"
 deno_media_type = { version = "=0.2.9", features = ["module_specifier"] }
 deno_native_certs = "0.3.0"
 deno_npm = "=0.36.0"
Repository: ollama/ollama
Pull request: Add model update to README.md


Changed files:
filename: README.md
patch: @@ -60,6 +60,7 @@ Pull a base model:
 ```
 ollama pull llama2
 ```
+> To update a model to the latest version, run `ollama pull llama2` again. The model will be updated (if necessary).
 
 Create a `Modelfile`:
Repository: facebook/react
Pull request: useless returnFiber

There is no use of returnFiber here, it can be removed.

Changed files:
filename: packages/react-reconciler/src/ReactChildFiber.js
patch: @@ -438,7 +438,6 @@ function createChildReconciler(
   }
 
   function mapRemainingChildren(
-    returnFiber: Fiber,
     currentFirstChild: Fiber,
   ): Map<string | number, Fiber> {
     // Add the remaining children to a temporary map so that we can find them by
@@ -1194,7 +1193,7 @@ function createChildReconciler(
     }
 
     // Add all children to a key map for quick lookups.
-    const existingChildren = mapRemainingChildren(returnFiber, oldFiber);
+    const existingChildren = mapRemainingChildren(oldFiber);
 
     // Keep scanning and use the map to restore deleted items as moves.
     for (; newIdx < newChildren.length; newIdx++) {
@@ -1404,7 +1403,7 @@ function createChildReconciler(
     }
 
     // Add all children to a key map for quick lookups.
-    const existingChildren = mapRemainingChildren(returnFiber, oldFiber);
+    const existingChildren = mapRemainingChildren(oldFiber);
 
     // Keep scanning and use the map to restore deleted items as moves.
     for (; !step.done; newIdx++, step = newChildren.next()) {
Repository: ollama/ollama
Pull request: add examples of projects using Ollama

add examples of projects using Ollama

Changed files:
filename: README.md
patch: @@ -146,7 +146,10 @@ Create a model from a `Modelfile`.
 curl -X POST http://localhost:11434/api/create -d '{"name": "my-model", "path": "/path/to/modelfile"}'
 ```
 
-## Awesome projects built with Ollama
+## Projects built with Ollama
 
-### Continue 
-Use [Continue](https://github.com/continuedev/continue) to embed Ollama inside of VS Code. The extension lets you highlight code to add to the prompt, ask questions in the sidebar, and generate code inline.
+- [Continue](https://github.com/continuedev/continue) - embeds Ollama inside Visual Studio Code. The extension lets you highlight code to add to the prompt, ask questions in the sidebar, and generate code inline.
+
+- [Discord AI Bot](https://github.com/mekb-turtle/discord-ai-bot) - interact with Ollama as a chatbot on Discord.
+
+- [Raycast Ollama](https://github.com/MassimilianoPasquini97/raycast_ollama) - Raycast extension to use Ollama for local llama inference on Raycast.
Repository: ggml-org/llama.cpp
Pull request: Fix FP16 ELU positive branch to mirror f32 behavior

make `ggml_vec_elu_f16` follow the same positive-branch logic as the f32 version

ensure half-precision ELU returns the input for x > 0 instead of expm1(x)

Changed files:
filename: ggml/src/ggml-cpu/vec.h
patch: @@ -820,7 +820,8 @@ inline static void ggml_vec_tanh_f16 (const int n, ggml_fp16_t * y, const ggml_f
 inline static void ggml_vec_elu_f32  (const int n, float * y, const float * x) { for (int i = 0; i < n; ++i) y[i] = (x[i] > 0.f) ? x[i] : expm1f(x[i]); }
 inline static void ggml_vec_elu_f16 (const int n, ggml_fp16_t * y, const ggml_fp16_t * x) {
     for (int i = 0; i < n; ++i) {
-        y[i] = GGML_CPU_FP32_TO_FP16(expm1f(GGML_CPU_FP16_TO_FP32(x[i])));
+        const float v = GGML_CPU_FP16_TO_FP32(x[i]);
+        y[i] = GGML_CPU_FP32_TO_FP16((v > 0.f) ? v : expm1f(v));
     }
 }
 inline static void ggml_vec_relu_f32 (const int n, float * y, const float * x) { for (int i = 0; i < n; ++i) y[i] = (x[i] > 0.f) ? x[i] : 0.f; }
Repository: denoland/deno
Pull request: fix: ensure coverage dir is stored absolute to prevent issues when cwd changes


Changed files:
filename: cli/args/mod.rs
patch: @@ -928,18 +928,18 @@ impl CliOptions {
     &self.flags.ca_stores
   }
 
-  pub fn coverage_dir(&self) -> Option<String> {
+  pub fn coverage_dir(&self) -> Option<PathBuf> {
     match &self.flags.subcommand {
       DenoSubcommand::Test(test) => test
         .coverage_dir
         .as_ref()
-        .map(ToOwned::to_owned)
-        .or_else(|| env::var("DENO_COVERAGE_DIR").ok()),
+        .map(|dir| self.initial_cwd.join(dir))
+        .or_else(|| env::var_os("DENO_COVERAGE_DIR").map(PathBuf::from)),
       DenoSubcommand::Run(flags) => flags
         .coverage_dir
         .as_ref()
-        .map(ToOwned::to_owned)
-        .or_else(|| env::var("DENO_COVERAGE_DIR").ok()),
+        .map(|dir| self.initial_cwd.join(dir))
+        .or_else(|| env::var_os("DENO_COVERAGE_DIR").map(PathBuf::from)),
       _ => None,
     }
   }

filename: cli/factory.rs
patch: @@ -1071,7 +1071,6 @@ impl CliFactory {
     };
     let create_coverage_collector =
       if let Some(coverage_dir) = cli_options.coverage_dir() {
-        let coverage_dir = PathBuf::from(coverage_dir);
         let fn_: crate::worker::CreateCoverageCollectorCb =
           Box::new(move |session| {
             CoverageCollector::new(coverage_dir.clone(), session)
Repository: ggml-org/llama.cpp
Pull request: Fix: Correct SVE implementation in ggml_vec_dot_f16_unroll

The previous SVE implementation for `ggml_vec_dot_f16_unroll` contained a bug due to a copy-paste error. The wrong variable was used in an FMA instruction, leading to incorrect results.


Changed files:
filename: ggml/src/ggml-cpu/vec.h
patch: @@ -144,14 +144,14 @@ inline static void ggml_vec_dot_f16_unroll(const int n, const int xs, float * GG
         for (int i = 0; i < np; i += ggml_f16_step) {
             ay1 = GGML_F16x_VEC_LOAD(y + i + 0 * ggml_f16_epr, 0); // 8 elements
 
-            ax1 = GGML_F16x_VEC_LOAD(x[0] + i + 0*ggml_f16_epr, 0); // 8 elemnst
+            ax1 = GGML_F16x_VEC_LOAD(x[0] + i + 0*ggml_f16_epr, 0); // 8 elements
             sum_00 = GGML_F16x_VEC_FMA(sum_00, ax1, ay1);     // sum_00 = sum_00+ax1*ay1
             ax1 = GGML_F16x_VEC_LOAD(x[1] + i + 0*ggml_f16_epr, 0); // 8 elements
             sum_10 = GGML_F16x_VEC_FMA(sum_10, ax1, ay1);
 
             ay2 = GGML_F16x_VEC_LOAD(y + i + 1 * ggml_f16_epr, 1); // next 8 elements
 
-            ax2 = GGML_F16x_VEC_LOAD(x[0] + i + 1*ggml_f16_epr, 1); // next 8 ekements
+            ax2 = GGML_F16x_VEC_LOAD(x[0] + i + 1*ggml_f16_epr, 1); // next 8 elements
             sum_01 = GGML_F16x_VEC_FMA(sum_01, ax2, ay2);
             ax2 = GGML_F16x_VEC_LOAD(x[1] + i + 1*ggml_f16_epr, 1);
             sum_11 = GGML_F16x_VEC_FMA(sum_11, ax2, ay2);
@@ -160,7 +160,7 @@ inline static void ggml_vec_dot_f16_unroll(const int n, const int xs, float * GG
 
             ax3 = GGML_F16x_VEC_LOAD(x[0] + i + 2*ggml_f16_epr, 2);
             sum_02 = GGML_F16x_VEC_FMA(sum_02, ax3, ay3);
-            ax1 = GGML_F16x_VEC_LOAD(x[1] + i + 2*ggml_f16_epr, 2);
+            ax3 = GGML_F16x_VEC_LOAD(x[1] + i + 2*ggml_f16_epr, 2);
             sum_12 = GGML_F16x_VEC_FMA(sum_12, ax3, ay3);
 
             ay4 = GGML_F16x_VEC_LOAD(y + i + 3 * ggml_f16_epr, 3);
Repository: ollama/ollama
Pull request: Add "Awesome projects built with Ollama" section to README, including Continue

Format and text are up for debate, but here's a description of Continue

Changed files:
filename: README.md
patch: @@ -145,3 +145,8 @@ Create a model from a `Modelfile`.
 ```
 curl -X POST http://localhost:11434/api/create -d '{"name": "my-model", "path": "/path/to/modelfile"}'
 ```
+
+## Awesome projects built with Ollama
+
+### Continue 
+Use [Continue](https://github.com/continuedev/continue) to embed Ollama inside of VS Code. The extension lets you highlight code to add to the prompt, ask questions in the sidebar, and generate code inline.
Repository: ollama/ollama
Pull request: Fixes

- Fix multiple LICENSE in Modelfile
- Check error from `filepath.Walk`
- fix build on Linux
- remove unnecessary `fmt.Sprintf`

Changed files:
filename: llama/llama.go
patch: @@ -1,7 +1,7 @@
 package llama
 
 /*
-#cgo CPPFLAGS: -O3 -Wall -Wextra -Werror -Wno-unused-function -Wno-unused-variable -DNDEBUG -DGGML_USE_K_QUANTS
+#cgo CPPFLAGS: -O3 -Wall -Wextra -Wno-unused-function -Wno-unused-variable -DNDEBUG -DGGML_USE_K_QUANTS
 #cgo CXXFLAGS: -std=gnu++11
 #cgo darwin CPPFLAGS:  -DGGML_USE_ACCELERATE
 #cgo darwin,arm64 CPPFLAGS: -DGGML_USE_METAL -DGGML_METAL_NDEBUG

filename: server/images.go
patch: @@ -271,7 +271,19 @@ func CreateModel(name string, path string, fn func(resp api.ProgressResponse)) e
 					layers = append(layers, newLayer)
 				}
 			}
-		case "license", "template", "system", "prompt":
+		case "license":
+			fn(api.ProgressResponse{Status: fmt.Sprintf("creating model %s layer", c.Name)})
+			// remove the prompt layer if one exists
+			mediaType := fmt.Sprintf("application/vnd.ollama.image.%s", c.Name)
+
+			layer, err := CreateLayer(strings.NewReader(c.Args))
+			if err != nil {
+				return err
+			}
+
+			layer.MediaType = mediaType
+			layers = append(layers, layer)
+		case "template", "system", "prompt":
 			fn(api.ProgressResponse{Status: fmt.Sprintf("creating model %s layer", c.Name)})
 			// remove the prompt layer if one exists
 			mediaType := fmt.Sprintf("application/vnd.ollama.image.%s", c.Name)
@@ -590,6 +602,9 @@ func DeleteModel(name string) error {
 		}
 		return nil
 	})
+	if err != nil {
+		return err
+	}
 
 	if err != nil {
 		return err
@@ -873,14 +888,11 @@ func checkBlobExistence(mp ModelPath, digest string, regOpts *RegistryOptions) (
 	return resp.StatusCode == http.StatusOK, nil
 }
 
-func uploadBlobChunked(mp ModelPath, location string, layer *Layer, regOpts *RegistryOptions, fn func(api.ProgressResponse)) error {
+func uploadBlobChunked(mp ModelPath, url string, layer *Layer, regOpts *RegistryOptions, fn func(api.ProgressResponse)) error {
 	// TODO allow resumability
 	// TODO allow canceling uploads via DELETE
 	// TODO allow cross repo blob mount
 
-	// Create URL
-	url := location
-
 	fp, err := GetBlobsPath(layer.Digest)
 	if err != nil {
 		return err