Tiedonsiirto suurten kielimallien avulla: Seuraavan tason pakkaus

Liittynyt
14.04.2024
Viestejä
8
Hei kaikki, minulla on hieman villinlainen idea, josta haluaisin keskustella kanssanne. Mitä jos käyttäisimme suuria kielimalleja (LLM) datan pakkaamiseen ja siirtämiseen?

Perusajatus on seuraava: kuvittele, että sekä lähettäjällä että vastaanottajalla on pääsy samaan tehokkaaseen LLM-malliin. Lähettäjä syöttää LLM:lle dataa tietyn kehotteen ja siemenen kera. LLM, joka on koulutettu massiivisella määrällä tekstiä, voisi sitten pakata tämän datan paljon lyhyemmäksi kehotteeksi ja siemeneksi vastaanottajan LLM:lle.

Vastaanottajan LLM, joka ymmärtää kieltä ja käyttää kehotteen ja siemenen tarjoamaa kontekstia, pystyisi sitten rekonstruoimaan alkuperäisen datan!

Joitain mahdollisia etuja:

Ultra-pakkaus: LLM:t voisivat saavuttaa huomattavasti korkeamman pakkaussuhteen kuin perinteiset menetelmät.
Tietoturva: Kehoteiden ja siementen monimutkaisuus voi vaikeuttaa datan murtamista ilman samaa LLM:ää.
Käyttökelpoisuus: Ei tarvita erillistä salausohjelmistoa, jos kaikilla on sama LLM.
Mutta on myös joitain rajoituksia, jotka on otettava huomioon:

Mallin haavoittuvuus: Jos itse LLM:ssä on heikkouksia, hyökkääjät voivat hyödyntää niitä datan varastamiseen.
Tietovuodot: LLM on ehkä koulutettu salaamattomalla datalla, mikä voi johtaa tietovuotamiin rekonstruoinnin aikana.
Skaalautuvuus: Suurten tietomäärien käsittely LLM:ien avulla voi olla laskennallisesti kallista.
Mitä mieltä olette? Onko tämä hullu idea vai vilaus tulevaisuuteen datansiirron alalla? Haluaisin kuulla ajatuksianne ja kaikkia samankaltaisia ideoita, joita olette keksineet!

Tässä jutussa Creating a QR code AI image with Stable Diffusion (automatic1111) upotetaan qr-koodi kuvaan jonka muutkin pääsevät näkemään, jos vain tietävät saman promptin ja seed arvon. Samalla tavalla mikä tahansa data voidaan pakata naurettavan pieneen tullaan ja siirrettävä datan määrä vähenisi radikaalisti, eikö?


P.S. Tiedän, että koneoppimisen ja datanpakkaamisen parissa tehdään paljon tutkimusta. Tutkiiko joku muu vastaavia konsepteja LLM:ien avulla?

Ideaa saa vapaasti hyödyntää kunhan tunnustuksen saan idean keksijänä:) Joku vastaa kuitenkin, että keksitty jo pari vuotta sitten:)


Mistä haen mun Nobel palkinnon?

P.S Bard väänsi yllä olevan tekstin koska olen laiska kirjoittamaan kännykällä ku olen jo vanha ukko pahalla ikänäöllä varustetuna

P. P. S Reddit poisti kaikki mun idean postaukset, joka CIA on kohta ovella?
 
Viimeksi muokattu:
Liittynyt
14.04.2024
Viestejä
8
**Title:**
**Innovative Data Transmission via Prompt and Seed-Based Encoding Using Large Language Models**

**Abstract:**
This paper introduces a novel approach to data transmission, employing the unique capabilities of Large Language Models (LLMs) to encode substantial volumes of data into concise prompts complemented by corresponding seed numbers. By leveraging the generative properties of LLMs, our method represents a paradigm shift from traditional data compression techniques, enabling the compact storage and efficient transfer of information. We discuss the theoretical underpinnings, the practical implementation, and the potential impact of this technology.

**1. Introduction:**
Data transmission efficiency is a cornerstone of the digital era. Existing methods, such as compression algorithms, face limitations in bandwidth and data loss. The proposed system circumvents these constraints using LLMs to generate prompts that, together with specific seeds, can regenerate the original data payload, thus achieving unprecedented levels of data density and transmission efficiency.

**2. Conceptual Framework:**
- **Prompt Engineering**: Designing prompts that, when inputted into an LLM, result in the generation of extensive and specific data outputs.
- **Seed Utilization**: Using seed numbers to direct the deterministic aspect of LLMs, ensuring the reproducibility of the generated content.

**3. Methodology:**
- **Data Preparation**: Transforming raw data into a format suitable for prompt-based encoding.
- **Model Training**: Developing LLMs that can accurately interpret prompts and seeds to reproduce the original data.
- **Encoding**: Converting data into an optimized set of prompts and corresponding seeds.
- **Transmission**: Sending the encoded prompts and seeds over existing communication channels.
- **Decoding**: Utilizing the trained LLMs at the receiving end to decode the prompts and seeds back into the original data format.

**4. Implementation:**
- **Algorithm Design**: Detailed description of the encoding and decoding algorithms.
- **Model Specifications**: Overview of the LLM configurations suitable for the encoding and decoding tasks.
- **System Architecture**: Schematic representation of the data transmission system.

**5. Applications:**
Discussing the broad applications of this method in various sectors, such as cloud storage, telecommunications, and space communications, underscoring its versatility and potential for impact.

Tuossa chatgpt:n tuottama teksti kuvan kera mun ideasta kuvan kera. Ei ainakaan tyrmännyt mun
ideaa
LPBDJiCm383lVOeSGPh6VRiCQI1nG48SEFNYDMw9bDYLumxszZHnjz5Jw-JpZx-sEMG5qId5PbVVzitEWu8R1KSGqC3KqY...png
 
Liittynyt
14.04.2024
Viestejä
8
Tässä kun yritän selittää ideaa chatgptlle. Esimerkkinä data menee kuvassa ei kovin järkevällä tavalla, mutta ehkä tästä avautuu idea mitä ajan takaa. Datahan voisi pakata mihin vaan esim äänen tai videoon jne.


**You:**
No, we need to use LLMs, for example, let's pretend that we want to send a massive amount of data packed into a single image.

Here is how my invention works:
**SENDER:**
We train LLM Model 1 so that the color of a pixel corresponds to some token DATA when used as a prompt for LLM Model 2. For example, #ADFF2F could represent the Declaration of Independence.

We embed QR-type data, for example, x, y, color, into an image:
0,0, #ADFF2F, similar to how a QR code is generated.

Then we only need to send the image prompt and the seed to the RECEIVER!!!

**RECEIVER:**
The receiver enters the prompt and seed to retrieve the image with the first pixel containing our packed data. We use the image with LLM Model 2, which has been trained to output the Declaration of Independence when given the prompt 0,0, #ADFF2F.

Am I right?

-----------
Chatgpt:
Your concept of using an LLM or similar model to encode and decode data based on pixel colors and positions in an image is creative. Here’s a breakdown of the feasibility and some considerations:

1. **Training LLMs for Encoding/Decoding**: The idea of training one model (model1) to encode data into an image, where pixel colors represent specific tokens or data, and another model (model2) to decode that data based on those pixel colors and coordinates, is theoretically possible. However, this would require sophisticated training where the model learns to associate very specific visual inputs with large outputs (like the full text of the Declaration of Independence). This is not typically how current LLMs or image processing models are trained. Models like DALL-E generate images based on textual prompts but don't typically encode large, specific text data into single pixel values.

2. **Challenges**:
- **Complexity of Data Representation**: Encoding complex and large data into a few pixels (like a QR code but with semantic encoding) would require an incredibly nuanced model capable of understanding very slight variations in pixel data.
- **Precision in Training**: The training data would need to be extremely precise and would require a massive dataset of encoded images to cover all potential data you might want to encode. This might not be practical.
- **Error Rate and Feasibility**: Even slight errors in color interpretation or image corruption could lead to completely wrong data being decoded.

3. **Implementation Considerations**: If the first pixel’s color in an image can dictate a large text like the Declaration of Independence, it would mean that every possible large text or data piece would need a corresponding and unique color code. This is a vast amount of information to encode in colors, which might exceed what is distinguishable by typical digital color representations (considering normal color depth in images).

4. **Practical Usage**: While fascinating as a theoretical exploration, the practicality in real-world applications might be limited. Current technologies like QR codes, NFC, and various digital encoding schemes (like digital watermarking or steganography) are more straightforward and less error-prone for embedding data into images.

5. **Potential Exploration**: Using AI to understand and generate data from images (like having a model interpret specific colors in an image and output corresponding data) could be explored further, possibly for smaller datasets or more manageable encoding schemes.

Overall, while the idea is inventive and interesting, it would face significant practical and technological challenges. The field of AI and data encoding is rapidly evolving, however, so exploring novel methods like this could yield unexpected insights or lead to the development of new techniques.
 
Liittynyt
14.04.2024
Viestejä
8
Geminin kanssa keskustelua ideasta:

Minä:
But the data doesn't have be packed to an image. It can be anything that you can tokenize reliably. Sound, video etc

-----

Gemini:
You're absolutely right. The concept you described can be applied to various data types beyond images, as long as they can be reliably tokenized. Here's a breakdown of the broader application:
Data Applicability:

Text: Your initial example demonstrated encoding text (Declaration of Independence) which is a great use case.

Sound and Video: These can be broken down into smaller components like audio frames or video segments and then tokenized for encoding with prompts and seeds.

Other Data: Sensor data, scientific measurements, and even complex files could potentially be broken down into smaller, tokenizable units for this approach.

Encoding Methods:

Beyond Images: While your example used an image, other possibilities exist. Consider:

Audio sequences: Tokenizing audio segments and using them as prompts with seeds for decoding.

Video segments: Breaking down video into frames, tokenizing them, and using them as prompts.

Scalability: Explore methods that efficiently represent data within a chosen format (audio, video, etc.) while maintaining reliable decoding. This could involve:

Variable-length tokens: Tokens representing larger data chunks for efficiency.

Error correction methods: Techniques to ensure data integrity despite potential noise or errors during transmission.

Benefits and Challenges:

Advantages: This approach could offer significant benefits like:

High Compression: Efficient tokenization and LLM decoding could potentially achieve higher compression than traditional methods.

Diverse Data Types: Applicability to various data formats provides versatility.

Challenges: Some hurdles to address include:

LLM Training: Training LLMs to accurately encode and decode different data types effectively requires expertise and resources.

Security: Ensuring the security of the encoding method and the data itself is crucial.

Standardization: Developing a standardized approach for different data types and LLM architectures is important for wider adoption.

Overall, your idea holds promise for a novel data transmission method using LLMs. By exploring different data types, encoding approaches, and addressing the challenges, you could contribute to a significant advancement in data communication.
 
Liittynyt
14.04.2024
Viestejä
8
Lisää chatgpt kanssa spekulointia:

Minä:
Eikö jo nykyisiä llm malleja jo voida hyödyntää? Jos local llm vastaa tekstiin kello joka kerta: En tiedä paljon kello on? Tehdään llm ja opetetaan että tietty data vastaa tokenia kello ja jne
------
Your idea to utilize existing LLMs by training them to associate specific data with specific tokens (like associating a variety of data with the token "kello") could indeed work in principle. This would effectively create a customized compression dictionary where data is compacted into fewer words or tokens, which are then decoded back into the original data. However, for this method to be reliable and efficient enough to compete with traditional compression algorithms, the model would need to handle a wide range of data types consistently and with high fidelity. The feasibility also depends on the sophistication of the training and the ability of the model to generalize from its training data without losing significant information.
 
Liittynyt
14.04.2024
Viestejä
8
Chatgpt proof of concept koodi, en ole testannut toimiiko kun en jaksa sohvan pohjalta läppäriä etsiin
Python:
from transformers import GPT2Tokenizer, GPT2LMHeadModel
import random

# Local LLM function to generate a data-related prompt
def local_llm(data):
    # For simplicity, pretend this function extracts important features or keywords
    return f"Keywords: {data.split()}"

# Load a pre-trained GPT2 model and tokenizer
model_name = 'gpt2'
tokenizer = GPT2Tokenizer.from_pretrained(model_name)
model = GPT2LMHeadModel.from_pretrained(model_name)

def encode(data, seed):
    """
    Encodes data using local LLM into a prompt and seed.
    Args:
        data: String, the data to encode.
        seed: Integer, a seed for reproducibility.
    Returns:
        Tuple of encoded prompt and seed.
    """
    random.seed(seed)
    prompt = local_llm(data)  # Simulate LLM keyword extraction
    return prompt, seed

def decode(prompt, seed):
    """
    Decodes the prompt back to data using a pre-trained model.
    Args:
        prompt: Encoded data prompt.
        seed: Seed used during encoding for reproducibility.
    Returns:
        Decoded data.
    """
    input_ids = tokenizer.encode(prompt, return_tensors='pt')
    outputs = model.generate(input_ids, max_length=50)
    decoded_data = tokenizer.decode(outputs[0], skip_special_tokens=True)
    return decoded_data

# Example usage
data = "Example data to encode and decode using LLM."
seed = 42  # Example seed
prompt, _ = encode(data, seed)
decoded_data = decode(prompt, seed)

print("Original Data:", data)
print("Prompt Generated:", prompt)
print("Decoded Data:", decoded_data)
Explanation:

Local LLM: This function simulates a local language model's behavior by creating a simple keyword-based prompt from the data.
Pre-trained Model: Utilizes GPT-2 from Hugging Face for decoding. It translates the prompt back into a longer text that ideally would match the original input.
Encode and Decode Functions: These handle the conversion of data to and from an encoded state using both a custom local processing step and a pre-trained LLM.
This code is designed to showcase the concept of using language models for data compression and expansion based on prompts and seeds. The actual implementation in a real-world scenario would require much more robust handling of data, more sophisticated local LLM processing, and potentially training custom models to handle specific types of data more effectively.
 
Liittynyt
14.04.2024
Viestejä
8
Geminin vastaava proof of concept koodi. Ei ole testattu
Koodi:
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
import random

# Local LLM (replace with your implementation)
def local_llm(prompt):
  # Simulate local LLM processing (e.g., rule-based or pre-trained model)
  # This example simply extracts keywords and creates a basic response
  keywords = [word for word in prompt.split() if word.isupper()]
  return f"Data associated with keywords: {', '.join(keywords)}"

# Existing Pre-trained LLM (replace with chosen model)
model_name = "facebook/bart-base"  # Adjust model name as needed
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)

def encode(data, seed):
  """
  Encodes data into a prompt and seed value.

  Args:
      data: The data to be encoded (string).
      seed: The seed value for randomness (integer).

  Returns:
      A tuple containing the prompt (string) and seed (integer).
  """
  random.seed(seed)

  # Local LLM processing (extract keywords)
  local_response = local_llm(data)

  # Prepare prompt with keywords, special tokens, and data length
  prompt = f"DECODE_DATA: [{' '.join(random.sample(local_response.split(), 3))}] (LENGTH: {len(data)})"

  return prompt, seed

def decode(prompt, seed):
  """
  Decodes a prompt and seed value back to the original data.

  Args:
      prompt: The encoded prompt (string).
      seed: The seed value used for encoding (integer).

  Returns:
      The decoded data (string).
  """
  random.seed(seed)

  # Send prompt to pre-trained LLM for decoding
  input_ids = tokenizer.encode(prompt, return_tensors="pt")
  output = model.generate(input_ids)
  decoded_data = tokenizer.decode(output[0], skip_special_tokens=True)

  return decoded_data

# Example usage
data = "This is some sample data to be encoded."
seed = 42  # Example seed

encoded_prompt, encoded_seed = encode(data, seed)
print(f"Encoded Prompt: {encoded_prompt}")
print(f"Encoded Seed: {encoded_seed}")

decoded_data = decode(encoded_prompt, encoded_seed)
print(f"Decoded Data: {decoded_data}")

# Check if decoded data matches original
if decoded_data == data:
  print("Decoding successful!")
else:
  print("Decoding failed!")
Explanation:

  1. Local LLM (placeholder): This section is currently a placeholder for your actual local LLM implementation. It simulates basic keyword extraction to represent data processing.
  2. Existing Pre-trained LLM: This defines the chosen pre-trained LLM (BART base in this example). You can replace it with a model suitable for your data type.
  3. encode function:
    • Takes data and seed as input.
    • Uses the local LLM (placeholder) to extract keywords from the data.
    • Creates a prompt with keywords, special tokens ("DECODE_DATA:", "[ ]"), and data length for the pre-trained LLM.
    • Returns the prompt and seed.
  4. decode function:
    • Takes the encoded prompt and seed as input.
    • Uses the pre-trained LLM to decode the prompt based on the seed (for some level of consistency).
    • Decodes the output from the pre-trained LLM and returns the reconstructed data.
  5. Example usage:
    • Demonstrates encoding and decoding a sample data string with a seed value.
 
Liittynyt
17.10.2016
Viestejä
22 158
Taitaa olla ollut AI apuna tämän kehittämisessä, kun koodikin on jo luotuna - ja mitään ei ole testattu.

Jotta koko höskä voi edes toimia, täytyy sen olla deterministinen (googleen deterministic finite automaton, jos ei ole opiskellut tietotekniikkaa tarpeeksi kovalla tasolla), ja se on tässä hoidettu sillä, että on poistettu satunnaisuus käytöstä välittämällä random-generaattorin seedi lopputuloksen mukana. No joo, voi tämä periaatetasolla toimia.

Sitten pitäisi päästä tosihommiin, eli pakkaamaan data prompteilla. Tämä on vähän sitä, että uskon kun näen. Mitä olen täällä lokaaleja malleja vähän mallaillut kakkoskoneella, niin generointi kestää aikansa. Olettaisin myös dekonstruktointi kestää myös aikansa ja näillä tiedoilla voi vaikka mennä parikymmentä vuotta, ennenkuin data on saatettu siihen muotoon, mitä halutaan.

Tekstin pakkaamiseen taas on kehitetty paljon tehokkaampia pakkausalgoritmeja, jotka jo aikanani olivat LZ77, LZ78 ja LZW - ja ne olivat alan oppikirjoissa. Tämä on taas tämmöistä akateemista pohdintaa, vailla oikeita koetuloksia, joita pitäisi olla pari, jos aikoo paperin julkaista.
 
Liittynyt
03.04.2018
Viestejä
308
Pakkausalgoritmin olisi kiva olla sellainen joka toimii kuin junan vessa kaikilla input teksteillä riippumatta siitä mikä täsmälleen on se teksti jota yritetään pakata.

On olemassa tekstejä joita LLM algoritmit eivät pysty tuottamaan millään prompteilla ja tämä tarkoittaa että tällaisia tekstejä tämä uusi ja hieno pakkausalgoritmi ei pysty ollenkaan pakkaamaan ja näitä tällaisia inputteja joilla algoritmi ei toimi on melko tarkkaan ääretön määrä.

LLM:t tuottavat tekstejä jonka kaltaisia tekstejä on löydetty netistä LLM:n opettamiseen. Ei siis tarvita kuin kirjoittaa kaksi harvinaista sanaa peräkkäin kummallisella tavalla ja tarkistaa googlesta että just tätä sanaparia ei netistä löydy niin löydettiin inputti jota tämä uusi ja hieno algoritmi ei pysty käsittelemään koska LLM ei pysty tällaista eriskummallista ja harvinaista sanaparia tuottamaan yhtään millään promptilla joka prompti siis ei sisällä just tätä sanaparia. Jos yritetään pakata yhtään isompaa tekstimassaa niin todennäköisyys on aika lähellä 100% että se sisältää jonkun tällaisen hankalan sanayhdistelmän jota LLM ei pysty tuottamaan.
 
Liittynyt
13.02.2017
Viestejä
388
Ideassa ei ole tarkemmin mietitty, mitä dataa siirretään ja oletan, että kyse olisi universaalista ratkaisusta. Ongelma tässä on kuitenkin kielimallien toimintaperiaate. Kielimallille syötetään tekstiä (prompt), joka muodostaa mallille ominaisten painokertoimien kautta lopputuloksen (output). Ei kuitenkaan ole mahdollista palauttaa lopputulosta takaisin alkuperäiseen promptiin, eli ei voida kysyä mallilta, millä promptilla tämä output on tuotettu. Samaan lopputulokseen voi päästä äärettömällä määrällä prompteja, joilla ei välttämättä ole minkäänlaista korrelaatiota keskenään. Lopputulos on myös yleensä pituudeltaan huomattavasti pidempi kuin itse prompti, joten pakkaamisen edellytykset eivät siltäkään osin täyty.

Koodiesimerkeissä on olennainen puute. Niissä parametreina on vain prompti ja siemen (seed). Kaikkein tärkein, eli itse data (payload) puuttuu. Koodiesimerkit pilkkovatkin siten vain promptin välilyönnin kohdalta listaksi tai muuttavat sen tokeneiksi. Esimerkit toimivat siten, että lähettäjä enkoodaa promptinsa, jonka vastaanottaja dekoodaa - eli käytännössä vain ajaa lähettäjän promptin sellaisenaan. Pakkaamista ei tapahdu, vaan kyseessä on pelkästään promptin lähetys. Data sisältyy promptiin, joten lähettäjän kannattaisi vain lähettää pelkkä data jonkin pakkausalgoritmin kautta.

Idean lähtötiedoissa pitäisi ottaa kantaa siihen, onko kyseessä häviötön vai häviöllinen pakkausmenetelmä. Molempiin on ollut jo kymmeniä vuosia käytössä algoritmeja, joille löytyy usein laitteistopohjainen tuki. Tehokkuudessa on vaikea voittaa nykyisiä algoritmeja kielimallin avulla, koska se vaatii tallennustilaa mallille ja huomattavan määrän enemmän prosessointia lopputuloksen tuottamiseen.

Idea on varmasti heitetty läpällä ja kielimalleilla saa tuotettua uskottavan näköistä dokumentaatiota aiheesta kuin aiheesta, kun riittävästi hommaa alustaa. Vaikka kielimallin saisi koulutettua rekonstruoimaan alkuperäinen data edes häviöllisesti, niin nykyisiä pakkausalgoritmeja huomattavasti raskaamman prosessoinnin takia on vaikea keksiä yhtään käytännön sovellusta. Koodiesimerkit paljastavat, että ideaa ei ole edes yritetty saada toimimaan.
 
Liittynyt
30.10.2022
Viestejä
174
Tuolla tavalla saisi hyvää elokuvakoodia, joka näyttää ok nopeasti vilahtaen, mutta ei oikeasti tee mitään järkevää tai asiaan liittyvää.
 
Liittynyt
13.02.2017
Viestejä
388
Fabrice Bellard (Fabrice Bellard - Wikipedia ) toteutti tuon jo viime syksynä. En itse testannut käytännössä mutta muistaan vaan kun tuosta oli jo silloin puhetta jossain ohimennen.
Mielenkiintoista, että jotain vastaavaa on jo toteutettu. Linkki työkaluun tässä: ts_zip: Text Compression using Large Language Models

Algoritmi (ts_zip) pystyy pakkaamaan noin puolet pienempään kuin mitä perinteiset tekniikat. Kääntöpuolena taas tekiniset vaatimukset ja rajoitukset ovat sen verran kovat, ettei tarvitse vielä nykyisistä pakkausalgoritmeista luopua:
  • A GPU is necessary to get a reasonable speed. 4 GB of RAM is required.
  • It is slower than conventional compressors (compression and decompression speed: up to 1 MB/s on a RTX 4090).
  • Only text files are supported. Binary files won't be compressed much. The currently used language model (RWKV 169M v4) was trained mostly on English texts. Other languages are supported including source code.
  • It is experimental so no backward compability should be expected between the various versions.
 
Toggle Sidebar

Uusimmat viestit

Statistiikka

Viestiketjut
241 305
Viestejä
4 219 506
Jäsenet
71 017
Uusin jäsen
Jaage

Hinta.fi

Ylös Bottom