helloadhavan/github_issues huggingface dataset:
Repository: vuejs/vue
Pull request: [automated] Patreon sponsors update

This is an automated pull request.

Changed files:
filename: BACKERS.md
patch: @@ -21,7 +21,7 @@ Funds donated via Patreon go directly to support Evan You's full-time work on Vu
     <img width="260px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/stdlib.png">
   </a>
 </p>
-
+  
 <!--special end-->
 
 <h2 align="center">Platinum via Patreon</h2>
@@ -214,6 +214,11 @@ Funds donated via Patreon go directly to support Evan You's full-time work on Vu
           <img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/vpnranks.png">
         </a>
       </td>
+      <td align="center" valign="middle">
+        <a href="https://www.simplyswitch.com/" target="_blank">
+          <img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/energy_comparison.png">
+        </a>
+      </td>
     </tr><tr></tr>
   </tbody>
 </table>

filename: README.md
patch: @@ -31,7 +31,7 @@ Funds donated via Patreon go directly to support Evan You's full-time work on Vu
     <img width="260px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/stdlib.png">
   </a>
 </p>
-
+  
 <!--special end-->
 
 <h3 align="center">Platinum Sponsors</h3>
@@ -219,6 +219,11 @@ Funds donated via Patreon go directly to support Evan You's full-time work on Vu
           <img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/vpnranks.png">
         </a>
       </td>
+      <td align="center" valign="middle">
+        <a href="https://www.simplyswitch.com/" target="_blank">
+          <img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/energy_comparison.png">
+        </a>
+      </td>
     </tr><tr></tr>
   </tbody>
 </table>
Repository: ggml-org/llama.cpp
Pull request: sync : ggml


Changed files:
filename: scripts/sync-ggml.last
patch: @@ -1 +1 @@
-d6754f3d0e6d0acd21c12442353c9fd2f94188e7
+553552e1d88be2b214b85e5159eedd39a63e2c34
Repository: facebook/react
Pull request: [compiler] Show logged errors in playground


In playground it's helpful to show all errors, even those that don't completely abort compilation. For example, to help demonstrate that the compiler catches things like setState in effects. This detects these errors and ensures we show them.


Changed files:
filename: compiler/apps/playground/components/Editor/EditorImpl.tsx
patch: @@ -44,6 +44,7 @@ import {
   PrintedCompilerPipelineValue,
 } from './Output';
 import {transformFromAstSync} from '@babel/core';
+import {LoggerEvent} from 'babel-plugin-react-compiler/dist/Entrypoint';
 
 function parseInput(
   input: string,
@@ -143,6 +144,7 @@ const COMMON_HOOKS: Array<[string, Hook]> = [
 function compile(source: string): [CompilerOutput, 'flow' | 'typescript'] {
   const results = new Map<string, Array<PrintedCompilerPipelineValue>>();
   const error = new CompilerError();
+  const otherErrors: Array<CompilerErrorDetail> = [];
   const upsert: (result: PrintedCompilerPipelineValue) => void = result => {
     const entry = results.get(result.name);
     if (Array.isArray(entry)) {
@@ -210,7 +212,11 @@ function compile(source: string): [CompilerOutput, 'flow' | 'typescript'] {
       },
       logger: {
         debugLogIRs: logIR,
-        logEvent: () => {},
+        logEvent: (_filename: string | null, event: LoggerEvent) => {
+          if (event.kind === 'CompileError') {
+            otherErrors.push(new CompilerErrorDetail(event.detail));
+          }
+        },
       },
     });
     transformOutput = invokeCompiler(source, language, opts);
@@ -237,6 +243,10 @@ function compile(source: string): [CompilerOutput, 'flow' | 'typescript'] {
       );
     }
   }
+  // Only include logger errors if there weren't other errors
+  if (!error.hasErrors() && otherErrors.length !== 0) {
+    otherErrors.forEach(e => error.push(e));
+  }
   if (error.hasErrors()) {
     return [{kind: 'err', results, error: error}, language];
   }
Repository: nodejs/node
Pull request: deps: patch V8 to 14.3.127.18

This is an automated patch update of V8 to 14.3.127.18.

Changed files:
filename: deps/v8/include/v8-version.h
patch: @@ -11,7 +11,7 @@
 #define V8_MAJOR_VERSION 14
 #define V8_MINOR_VERSION 3
 #define V8_BUILD_NUMBER 127
-#define V8_PATCH_LEVEL 17
+#define V8_PATCH_LEVEL 18
 
 // Use 1 for candidates and 0 otherwise.
 // (Boolean macro values are not supported by all preprocessors.)

filename: deps/v8/src/codegen/arm64/assembler-arm64.cc
patch: @@ -4968,7 +4968,7 @@ void Assembler::CheckVeneerPool(bool force_emit, bool require_jump,
     return;
   }
 
-  CHECK_LT(pc_offset(), unresolved_branches_first_limit());
+  DCHECK(pc_offset() < unresolved_branches_first_limit());
 
   // Some short sequence of instruction mustn't be broken up by veneer pool
   // emission, such sequences are protected by calls to BlockVeneerPoolFor and
Repository: vuejs/vue
Pull request: [automated] Patreon sponsors update

This is an automated pull request.

Changed files:
filename: BACKERS.md
patch: @@ -209,6 +209,11 @@ Funds donated via Patreon go directly to support Evan You's full-time work on Vu
           <img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/x_team.png">
         </a>
       </td>
+      <td align="center" valign="middle">
+        <a href="https://www.vpnranks.com/" target="_blank">
+          <img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/vpnranks.png">
+        </a>
+      </td>
     </tr><tr></tr>
   </tbody>
 </table>

filename: README.md
patch: @@ -214,6 +214,11 @@ Funds donated via Patreon go directly to support Evan You's full-time work on Vu
           <img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/x_team.png">
         </a>
       </td>
+      <td align="center" valign="middle">
+        <a href="https://www.vpnranks.com/" target="_blank">
+          <img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/vpnranks.png">
+        </a>
+      </td>
     </tr><tr></tr>
   </tbody>
 </table>
Repository: ollama/ollama
Pull request: Fix dockerfile.


Changed files:
filename: Dockerfile
patch: @@ -104,8 +104,8 @@ COPY --from=cuda-12 dist/lib/ollama/cuda_v12 /lib/ollama/cuda_v12
 FROM --platform=linux/arm64 scratch AS arm64
 COPY --from=cuda-11 dist/lib/ollama/cuda_v11 /lib/ollama/cuda_v11
 COPY --from=cuda-12 dist/lib/ollama/cuda_v12 /lib/ollama/cuda_v12
-COPY --from=jetpack-5 dist/lib/ollama/cuda_v11 lib/ollama/cuda_jetpack5
-COPY --from=jetpack-6 dist/lib/ollama/cuda_v12 lib/ollama/cuda_jetpack6
+COPY --from=jetpack-5 dist/lib/ollama/cuda_v11 /lib/ollama/cuda_jetpack5
+COPY --from=jetpack-6 dist/lib/ollama/cuda_v12 /lib/ollama/cuda_jetpack6
 
 FROM scratch AS rocm
 COPY --from=rocm-6 dist/lib/ollama/rocm /lib/ollama/rocm
Repository: facebook/react
Pull request: [Flight] Call finishHaltedTask on sync aborted tasks in stream abort listeners

This is the same as we do for currently rendering tasks. They get effectively sync aborted when the listener is invoked.

We potentially miss out on some debug info in that case but that would only apply to any entries inside the stream which doesn't really have their own debug info anyway.

Changed files:
filename: packages/react-server/src/ReactFlightServer.js
patch: @@ -1079,8 +1079,9 @@ function serializeReadableStream(
     signal.removeEventListener('abort', abortStream);
     const reason = signal.reason;
     if (enableHalt && request.type === PRERENDER) {
-      haltTask(streamTask, request);
       request.abortableTasks.delete(streamTask);
+      haltTask(streamTask, request);
+      finishHaltedTask(streamTask, request);
     } else {
       // TODO: Make this use abortTask() instead.
       erroredTask(request, streamTask, reason);
@@ -1208,8 +1209,9 @@ function serializeAsyncIterable(
     signal.removeEventListener('abort', abortIterable);
     const reason = signal.reason;
     if (enableHalt && request.type === PRERENDER) {
-      haltTask(streamTask, request);
       request.abortableTasks.delete(streamTask);
+      haltTask(streamTask, request);
+      finishHaltedTask(streamTask, request);
     } else {
       // TODO: Make this use abortTask() instead.
       erroredTask(request, streamTask, signal.reason);
@@ -2968,7 +2970,9 @@ function serializeBlob(request: Request, blob: Blob): string {
     signal.removeEventListener('abort', abortBlob);
     const reason = signal.reason;
     if (enableHalt && request.type === PRERENDER) {
+      request.abortableTasks.delete(newTask);
       haltTask(newTask, request);
+      finishHaltedTask(newTask, request);
     } else {
       // TODO: Make this use abortTask() instead.
       erroredTask(request, newTask, reason);
Repository: vuejs/vue
Pull request: [automated] Patreon sponsors update

This is an automated pull request.

Changed files:
filename: BACKERS.md
patch: @@ -200,7 +200,7 @@ Funds donated via Patreon go directly to support Evan You's full-time work on Vu
         </a>
       </td>
       <td align="center" valign="middle">
-        <a href="http://x-team.com/join" target="_blank">
+        <a href="https://x-team.com/join/?utm_source=vuejsorg&utm_medium=sponsor&utm_campaign=vuejsorg-patreon" target="_blank">
           <img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/x_team.png">
         </a>
       </td>

filename: README.md
patch: @@ -205,7 +205,7 @@ Funds donated via Patreon go directly to support Evan You's full-time work on Vu
         </a>
       </td>
       <td align="center" valign="middle">
-        <a href="http://x-team.com/join" target="_blank">
+        <a href="https://x-team.com/join/?utm_source=vuejsorg&utm_medium=sponsor&utm_campaign=vuejsorg-patreon" target="_blank">
           <img width="148px" src="https://raw.githubusercontent.com/vuejs/vuejs.org/master/themes/vue/source/images/x_team.png">
         </a>
       </td>
Repository: vercel/next.js
Pull request: Use null-prototype objects in server actions manifests

As a defense-in-depth mechanism, we're converting the server actions manifests to use null-prototype objects, so that property lookups cannot traverse `Object.prototype`.

Changed files:
filename: packages/next/src/server/app-render/manifests-singleton.ts
patch: @@ -274,14 +274,22 @@ export function selectWorkerForForwarding(
 export function setManifestsSingleton({
   page,
   clientReferenceManifest,
-  serverActionsManifest,
+  serverActionsManifest: rawServerActionsManifest,
 }: {
   page: string
   clientReferenceManifest: DeepReadonly<ClientReferenceManifest>
   serverActionsManifest: DeepReadonly<ActionManifest>
 }) {
   const existingSingleton = globalThisWithManifests[MANIFESTS_SINGLETON]
 
+  const serverActionsManifest: DeepReadonly<ActionManifest> = {
+    encryptionKey: rawServerActionsManifest.encryptionKey,
+    // Use null-prototypes for the action objects to prevent prototype pollution
+    // from affecting action ID lookups.
+    node: Object.assign(Object.create(null), rawServerActionsManifest.node),
+    edge: Object.assign(Object.create(null), rawServerActionsManifest.edge),
+  }
+
   if (existingSingleton) {
     existingSingleton.clientReferenceManifestsPerRoute.set(
       normalizeAppPath(page),
Repository: ggml-org/llama.cpp
Pull request: llama-graph: replace cont with reshape for alpha in qwen35

I did not understand why this is there, since we can use a reshape? Maybe I missed something. Gives a small TG boost ~1%

Changed files:
filename: src/models/qwen35.cpp
patch: @@ -224,7 +224,7 @@ ggml_tensor * llm_build_qwen35::build_layer_attn_linear(
     beta = ggml_sigmoid(ctx0, beta);
 
     ggml_tensor * alpha = build_lora_mm(model.layers[il].ssm_alpha, cur, model.layers[il].ssm_alpha_s);
-    alpha = ggml_cont_3d(ctx0, alpha, num_v_heads, n_seq_tokens, n_seqs);
+    alpha = ggml_reshape_3d(ctx0, alpha, num_v_heads, n_seq_tokens, n_seqs);
     cb(alpha, "alpha", il);
 
     ggml_tensor * alpha_biased   = ggml_add(ctx0, alpha, model.layers[il].ssm_dt);

filename: src/models/qwen35moe.cpp
patch: @@ -224,7 +224,7 @@ ggml_tensor * llm_build_qwen35moe ::build_layer_attn_linear(
     beta = ggml_sigmoid(ctx0, beta);
 
     ggml_tensor * alpha = build_lora_mm(model.layers[il].ssm_alpha, cur, model.layers[il].ssm_alpha_s);
-    alpha = ggml_cont_3d(ctx0, alpha, num_v_heads, n_seq_tokens, n_seqs);
+    alpha = ggml_reshape_3d(ctx0, alpha, num_v_heads, n_seq_tokens, n_seqs);
     cb(alpha, "alpha", il);
 
     ggml_tensor * alpha_biased   = ggml_add(ctx0, alpha, model.layers[il].ssm_dt);
Repository: ollama/ollama
Pull request: cleanup: remove OLLAMA_TMPDIR and references to temporary executables

OLLAMA_TMPDIR and extractRunners() were removed in 4879a234c4bd3f2bbc99d9b09c44bd99fc337679.

Changed files:
filename: cmd/cmd.go
patch: @@ -1381,7 +1381,6 @@ func NewCLI() *cobra.Command {
 				envVars["OLLAMA_NOPRUNE"],
 				envVars["OLLAMA_ORIGINS"],
 				envVars["OLLAMA_SCHED_SPREAD"],
-				envVars["OLLAMA_TMPDIR"],
 				envVars["OLLAMA_FLASH_ATTENTION"],
 				envVars["OLLAMA_KV_CACHE_TYPE"],
 				envVars["OLLAMA_LLM_LIBRARY"],

filename: docs/troubleshooting.md
patch: @@ -26,7 +26,6 @@ When you run Ollama on **Windows**, there are a few different locations. You can
 - `explorer %LOCALAPPDATA%\Ollama` to view logs.  The most recent server logs will be in `server.log` and older logs will be in `server-#.log` 
 - `explorer %LOCALAPPDATA%\Programs\Ollama` to browse the binaries (The installer adds this to your user PATH)
 - `explorer %HOMEPATH%\.ollama` to browse where models and configuration is stored
-- `explorer %TEMP%` where temporary executable files are stored in one or more `ollama*` directories
 
 To enable additional debug logging to help troubleshoot problems, first **Quit the running app from the tray menu** then in a powershell terminal
 
@@ -69,10 +68,6 @@ If you run into problems on Linux and want to install an older version, or you'd
 curl -fsSL https://ollama.com/install.sh | OLLAMA_VERSION=0.5.7 sh
 ```
 
-## Linux tmp noexec 
-
-If your system is configured with the "noexec" flag where Ollama stores its temporary executable files, you can specify an alternate location by setting OLLAMA_TMPDIR to a location writable by the user ollama runs as. For example OLLAMA_TMPDIR=/usr/share/ollama/
-
 ## Linux docker
 
 If Ollama initially works on the GPU in a docker container, but then switches to running on CPU after some period of time with errors in the server log reporting GPU discovery failures, this can be resolved by disabling systemd cgroup management in Docker.  Edit `/etc/docker/daemon.json` on the host and add `"exec-opts": ["native.cgroupdriver=cgroupfs"]` to the docker configuration.

filename: docs/windows.md
patch: @@ -62,7 +62,6 @@ the explorer window by hitting `<Ctrl>+R` and type in:
     - *upgrade.log* contains log output for upgrades
 - `explorer %LOCALAPPDATA%\Programs\Ollama` contains the binaries (The installer adds this to your user PATH)
 - `explorer %HOMEPATH%\.ollama` contains models and configuration
-- `explorer %TEMP%` contains temporary executable files in one or more `ollama*` directories
 
 ## Uninstall
Repository: vuejs/vue
Pull request: [automated] Patreon backers update (Apr 2019

This is an automated pull request.

Changed files:
filename: BACKERS.md
patch: @@ -352,114 +352,113 @@ Funds donated via Patreon go directly to support Evan You's full-time work on Vu
 - Shawn Wildermuth
 - Samuel Smith
 - donny
-- Sean Washington
 - Simon East
+- Keisuke Kita
 - kazupon
+- Sean Washington
 - Lars Andreas Ness
+- Benjamin Listwon
 - Kirk Lewis
 - Stephen Michael Hartley
-- Keisuke Kita
-- Wen-Tien Chang
-- Benjamin Listwon
 - Victor Tolbert
+- Wen-Tien Chang
 - Karol
 - Phan An
-- Barbara Liau
-- Miljan Aleksic
 - James J. Ye
+- Barbara Liau
 - Luiz
-- Jarek Tkaczyk
 - Matsumoto Takamasa
-- Duncan Kenzie
-- Mike Margerum
+- Jarek Tkaczyk
 - Niannian Modisette
-- Bernhard E. Reiter
 - Matt Jones
+- Duncan Kenzie
 - Guy Gavergun
+- Shinya Katayama
+- Mike Margerum
+- Bernhard E. Reiter
+- Chengzhi Yin
 - Zoran Knezevic
 - Jon Hobbs-Smith
 - Pierre Vanhulst
-- Shinya Katayama
-- Asaf Yishai
-- Anthony Estebe
 - Akiho Nagao
 - Haim Yulzari
+- Asaf Yishai
+- Anthony Estebe
+- Jeremy Tan
 - Jim Raden
 - IMGNRY
-- Jeremy Tan
-- Tyler
-- Yong Jun Thong
 - Tai Shi Ling
-- Jamie McElwain
-- Matias Verdier
+- Yong Jun Thong
+- Tyler
 - Vivekanandhan Natarajan
-- Daniel Waghorn
-- Mickaël Andrieu
-- Chih-Hsuan Fan
+- Matias Verdier
 - Rafael Belvederese
+- Chih-Hsuan Fan
 - Guilherme S L de Souza
-- Joe Gregory
-- Cliff Hess
+- Daniel Waghorn
 - Rob Yedlin
+- Mickaël Andrieu
+- Jamie McElwain
 - Jordan Oroshiba
-- RADD Creative
-- Marcos Moura
+- Cliff Hess
+- Joe Gregory
 - Richard Simpson
+- Marcos Moura
 - Jessie Hernandez
-- Aparajita Fishman
 - Ivan Sieder
 - Eric
+- Aparajita Fishman
 - Romain Lienard
+- Bohdan Kokotko
 - Christo Crampton
 - David Ang
-- Bohdan Kokotko
 - Donald Fischer
+- Alexander Weiher
+- Oskar Lindgren
+- Jere Sjöroos
 - Wakana Seki
 - David Kaplan
+- Ben Hong
 - Domenico Gaudioso
 - Jaeyoung Lee
-- Ben Hong
-- Alexander Weiher
-- Oskar Lindgren
-- Jere Sjöroos
 - Andy
-- John Cleveland
-- Daniel Mattingley
 - Joe Cochran
-- Elon Hung
-- Teon Ooi
-- Chris Calo
-- Colt Borg
 - Matt Sencenbaugh
+- Juan Bermudez
 - Hannes Kochniß
+- Colt Borg
 - Alberto T. Payero Mota
-- Juan Bermudez
+- Daniel Mattingley
+- Teon Ooi
+- Chris Calo
+- Elon Hung
+- Soichiro Isshiki
 - Milan Zivkovic
-- Garion Herman
 - Christopher Bemister
 - Ed Linklater
+- Garion Herman
 - Marko Boskovic
-- Soichiro Isshiki
+- Rob
 - Andrew Willis
 - Yusuke Kawabata
 - Princeyesuraj Edward
 - shimbaco
-- Nick Dandakis
-- Carlos Adrián
-- Peter Matkovsky
-- 极 蔡
 - 龙腾道
-- Kenneth Crawford
-- Fedor Indutny
+- 极 蔡
+- Peter Matkovsky
+- Nick Dandakis
 - Fabien GuySake Ungerer
-- Max Fletcher
+- Fedor Indutny
 - Masato Miura
 - Nathan Mallison
+- Shapovalov Pavel
 - David McGuigan
+- Max Fletcher
 - Bill Condo
 - Kevin Batdorf
+- Ivan Buncic
 - Pierre Lebrun
-- Juli A Schlack
+- Sheree Peña
 <!--10 end-->
 
 <h2 align="center">Backers via OpenCollective</h2>
Repository: huggingface/transformers
Pull request: Revise MIGRATION_GUIDE_V5.md for version 5 updates


Changed files:
filename: MIGRATION_GUIDE_V5.md
patch: @@ -16,13 +16,6 @@ limitations under the License.
 
 # Version 5 Migration guide
 
-> [!NOTE] 
-> 👀 Welcome to the migration guide for the first release candidate! Nothing is final and things are still actively in 
-> movement. We have a section dedicated to what is planned for future release candidates, yet is known not to work in 
-> the RC0. Look for "Disclaimers for the RC0".
-> 
-> We'll be eagerly awaiting your feedback in our GitHub issues!
-
 ## Library-wide changes with widespread impact
 
 ### Removal of TensorFlow and Jax
@@ -104,10 +97,7 @@ class Llama5Tokenizer(TokenizersBackend):
         else:
             self._vocab = vocab
 
-        if merges is not None:
-            self._merges = merges or []
-        else:
-            self._merges = generate_merges(filtered_vocab)
+        self._merges = merges or []
 
         self._tokenizer = Tokenizer(
             BPE(vocab=self._vocab, merges=self._merges, fuse_unk=True)
@@ -313,7 +303,6 @@ model_inputs["labels"] = model_inputs.pop("input_ids_target")
 
 **Removed Methods:**
 - `create_token_type_ids_from_sequences()`: Removed from base class. Subclasses that need custom token type ID creation should implement this method directly.
-- `clean_up_tokenization()`: Removed from base class. Now defined at model class level for models that need it (e.g., PLBart, CLVP, Wav2Vec2).
 - `prepare_for_model()`, `build_inputs_with_special_tokens()`, `truncate_sequences()`: Moved from `tokenization_utils_base.py` to `tokenization_python.py` for `PythonBackend` tokenizers. `TokenizersBackend` provides model-ready input via `tokenize()` and `encode()`, so these methods are no longer needed in the base class.
 - `_switch_to_input_mode()`, `_switch_to_target_mode()`, `as_target_tokenizer()`: Removed from base class. Use `__call__()` with `text_target` parameter instead.
Repository: huggingface/transformers
Pull request: bring back clean_up_tokenization_spaces to tokenizers backend

bring back clean_up_tokenization_spaces to tokenizers backend!  for v5

https://github.com/huggingface/transformers/pull/42916
https://github.com/huggingface/transformers/issues/42913
https://github.com/huggingface/transformers/pull/42900
https://github.com/huggingface/transformers/issues/42898



Changed files:
filename: src/transformers/tokenization_utils_tokenizers.py
patch: @@ -926,7 +926,33 @@ def _decode(
             token_ids = [token_ids]
         if isinstance(token_ids, dict):
             token_ids = token_ids["input_ids"]
-        return self._tokenizer.decode(token_ids, skip_special_tokens=skip_special_tokens)
+        text = self._tokenizer.decode(token_ids, skip_special_tokens=skip_special_tokens)
+
+        clean_up_tokenization_spaces = (
+            clean_up_tokenization_spaces
+            if clean_up_tokenization_spaces is not None
+            else self.clean_up_tokenization_spaces
+        )
+        if clean_up_tokenization_spaces:
+            # Call custom cleanup method if it exists
+            if hasattr(self, "clean_up_tokenization") and callable(self.clean_up_tokenization):
+                text = self.clean_up_tokenization(text)
+            else:
+                # Apply standard cleanup
+                text = (
+                    text.replace(" .", ".")
+                    .replace(" ?", "?")
+                    .replace(" !", "!")
+                    .replace(" ,", ",")
+                    .replace(" ' ", "'")
+                    .replace(" n't", "n't")
+                    .replace(" 'm", "'m")
+                    .replace(" 's", "'s")
+                    .replace(" 've", "'ve")
+                    .replace(" 're", "'re")
+                )
+
+        return text
 
     def _save_pretrained(
         self,

filename: tests/utils/test_tokenization_utils.py
patch: @@ -198,6 +198,21 @@ def test_push_to_hub_dynamic_tokenizer_with_both_slow_and_fast_classes(self):
             self.assertEqual(tokenizer.__class__.__name__, "CustomTokenizerFast")
 
 
+@require_tokenizers
+class TokenizersBackendTest(unittest.TestCase):
+    def test_clean_up_tokenization_spaces(self):
+        tokenizer = GPT2TokenizerFast.from_pretrained("openai-community/gpt2")
+
+        text_with_artifacts = "Hello , how are you ? I 'm here ."
+        token_ids = tokenizer.encode(text_with_artifacts)
+
+        decoded_no_cleanup = tokenizer.decode(token_ids, clean_up_tokenization_spaces=False)
+        self.assertEqual(decoded_no_cleanup, "Hello , how are you ? I 'm here .")
+
+        decoded_with_cleanup = tokenizer.decode(token_ids, clean_up_tokenization_spaces=True)
+        self.assertEqual(decoded_with_cleanup, "Hello, how are you? I'm here.")
+
+
 class TrieTest(unittest.TestCase):
     def test_trie(self):
         trie = Trie()