Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror

Comment Re:Lots of Unicode in the Learned Tokens (Score 1) 104

here's a python script for corrupting GGUFs if you want to try it out :)

input: "model_path_here"
output: (the path you gave appended with _2)

```
import os
import numpy as np
import shutil
import sys
from typing import Optional

def analyze_and_modify_gguf_file(file_path: str, modify_bytes: int = 128) -> Optional[str]:
        """
        Modifies a GGUF file by slightly adjusting weights in the middle section.
        copies first, the modifies that "_2.gguf" in-place.

        Args:
                file_path: Path to the input GGUF file
                modify_bytes: Number of bytes to modify (will be adjusted to even number)

        Returns:
                Path to the modified file, or None if operation fails
        """
        try:
                # Get file size without loading into memory
                file_size = os.path.getsize(file_path)
                print(f"Original file size: {file_size} bytes")

                # Ensure modify_bytes is even and within bounds
                modify_bytes = min(file_size, modify_bytes + (modify_bytes % 2))

                # Calculate positions
                middle = file_size // 2
                half_modify = modify_bytes // 2
                start = max(0, middle - half_modify)
                end = min(file_size, middle + half_modify)

                print(f"Middle of file: {middle} bytes")
                print(f"Will modify {modify_bytes} bytes from position {start} to {end}")

                # Create new file path
                new_file_path = file_path.replace(".gguf", "_2.gguf")

                # First do a fast copy of the entire file
                shutil.copy2(file_path, new_file_path)

                # Now work with the copy in-place
                with open(new_file_path, "r+b") as f:
                        # Seek to the section we want to modify
                        f.seek(start)

                        # Read only the section we need to modify
                        data = np.frombuffer(f.read(end - start), dtype=np.uint8)

                        # Extract high and low 4-bit values
                        high = (data & 0xF0) >> 4
                        low = data & 0x0F

                        # Interleave them into a single array
                        weights = np.empty(len(data) * 2, dtype=np.uint8)
                        weights[0::2] = high
                        weights[1::2] = low

                        # Generate random bits efficiently using numpy
                        random_bits = np.random.randint(0, 2, size=len(weights), dtype=np.uint8)

                        # Vectorized weight modification
                        modified_weights = np.clip(
                                weights + np.where(random_bits, 1, -1),
                                0, 15
                        )

                        # Repack into bytes efficiently
                        modified_bytes = np.bitwise_or(
                                np.left_shift(modified_weights[0::2], 4),
                                modified_weights[1::2]
                        ).astype(np.uint8)

                        # Write back the modified section
                        f.seek(start)
                        f.write(modified_bytes.tobytes())

                print(f"\nModified file saved as: {new_file_path}")
                print(f"Bytes modified: {len(modified_bytes)} at offset {start}")

                return new_file_path

        except Exception as e:
                print(f"Error: {e}")
                return None

if __name__ == "__main__":
        file_path = "model_path_here"

        modify_bytes = 128
        if len(sys.argv) > 1:
                try:
                        modify_bytes = int(sys.argv[1])
                except ValueError:
                        print("Invalid number of bytes specified. Defaulting to 128.")

        analyze_and_modify_gguf_file(file_path, modify_bytes)
```

Comment Lots of Unicode in the Learned Tokens (Score 3, Informative) 104

Some thoughts from the mechanistic interpretability front: I was toying with a few gpt4all models just the other day (including their smaller reasoning model), and injecting random data into the weights and, as the quantity of random data increases, the performance of the models shifted through a few phases when testing at Temperature 0.0 (for reproducibility):

1. Differentiation: small amount of randomness, the results for simple queries like "What's your name?" changed (ex. "a 19-year old girl" became "a 10-year old girl."
2. Instruction Framing: more randomness meant it was more likely to create "instruct" style responses, including tangentially related Multiple Choice quizzes
3. Unicodification: lots and lots of Chinese + other unicode bytes, sometimes still relevant to the query, mostly not
4. Garbage
5. Repetitive null output (ex: strings of @'s)

It really seemed to be that just the sheer amount of unicode exposure leans Chinese.

Lazy Reproduction Methodology:

Take a vector of random bits, find the center of a LLM file containing binary weights, then use the bits to push the value of each weight up or down (with floors/ceilings, no wraparounds). In a model like Qwen 1.5b with 4-bit quantization, you just go to the center of the file, offset by how many weights you're overwriting, and unpack each byte of 8 bits into 2 chunks of 4. If the weight is stored as 0110 and your dice roll bit is 1, change it to 0111. If the dice roll bit is 0, change it to 0101. This is the lazy way to quickly play with the idea. I find that with about 1024 or 2048 bytes worth of random data you can keep it in Stage 1 pretty well. Expand the amount using the weight-shifting scheme if you want to see it start spitting out Unicode like mad, claiming to be god (literally breaks the late-trained fine tuning guardrails it seems), or spitting out broken token ids. Examples: https://ancillary-proxy.atarimworker.io?url=https%3A%2F%2Fx.com%2FCottenIO%2Fstatus%2F1875000049056506061

Comment Re:Has that ever worked? (Score 1) 27

I would argue that Final Fantasy XIV was such a game.

https://ancillary-proxy.atarimworker.io?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FFinal_Fantasy_XIV%23Testing_and_release

Wikipedia glosses over it, but the launch was widely considered to be a failure. With public apologies from the dev team and a major re-release and PR push later.

https://ancillary-proxy.atarimworker.io?url=https%3A%2F%2Fwww.pcgamer.com%2Fsquare-enix-say-sorry-for-final-fantasy-xiv-announce-staff-changes-and-free-trial-extension%2F

Seems like it did well enough for an MMO afterwards.

Submission + - Bitcoin drops 25% to under $5,900 in Coronavirus panic (forbes.com)

Draconi writes: The price of Bitcoin dropped from it's March 6th, 2020 high of $9,126 (https://ancillary-proxy.atarimworker.io?url=https%3A%2F%2Fwww.coindesk.com%2Fprice%2Fbitcoin) to under $5,900 today as market sell-offs accelerated with the S&P and Dow Jones dropping 7% in early hours trading.

Bitcoin, long considered to be a safe-haven during times of economic stress, currently costs at least $4,313 in electricity per coin to generate (https://ancillary-proxy.atarimworker.io?url=https%3A%2F%2Fwww.trinsicoin.com). The latest drop has wiped out all 2020 gains for Bitcoin and sent a ripple effect across other cryptocurrencies, with Ethereum down nearly 30%.

Comment He literally kept proof of crimes on his phone (Score 5, Interesting) 102

Check out Item (b) in "Griffith's Electronic Communications" from the indictment:

"I need to send 1 [unit of Cryptocurrency-1] between North and South Korea." In response, Individual-2 asked, in sum and substance, "Isn't that violating sanctions?" GRIFFITH replied, "it is."

It's not just about giving a speech, it's about violation of sanctions by a U.S. citizen who, after he realized how much trouble he might be in, casually asked the investigator how he would go about switching his citizenship!

Submission + - CEX.io and BTC-e.com Withdrawals Linked to Russian Election Interference (cotten.io)

Draconi writes: Based on the indirect references in the Nytksho indictment and Olympic anti-doping hacking indictment an analysis of the Bitcoin blockchain around those events, correlated with the Mueller Report's notes, demonstrates that the GRU led cyberattack and disinformation units (a.k.a. the Fancy Bear hacking team) withdrew funds from both CEX.io and BTC-e.com to fund domain purchases, server rentals, and VPN services.

The purchase trails are fully exposed in the Bitcoin blockchain as funds are used, consolidated, and deposited into secondary online wallets such as SpectroCoin.com and Xapo.com. Anyone can follow along and trace the payment chains to see exactly how the Russians were spending their money, when, and on what.

Slashdot Top Deals

Theory is gray, but the golden tree of life is green. -- Goethe

Working...