LeroyDyer commited on
Commit
64faffa
·
verified ·
1 Parent(s): 6bc0f63

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +116 -5
README.md CHANGED
@@ -260,6 +260,7 @@ print(f"Encoded sound file saved to example_base64.txt")
260
  decode_base64_to_file(encoded_sound, "decoded_example.mp3")
261
  print("Decoded sound file saved as decoded_example.mp3")
262
  ```
 
263
  # Pipeline Example: Image Files
264
  ``` python
265
 
@@ -289,17 +290,127 @@ Ensure the input file exists, and specify the correct output path during decodin
289
  This design is flexible and reusable for various file types, making it a robust solution for encoding and decoding files into Base64.
290
 
291
 
292
-
293
-
294
-
295
  # Prompt Engineering for Training:
296
 
297
  Early training involved embedding large, detailed prompts to improve the model’s depth of response and adaptability.
298
  Later stages refined this with smaller prompts for more concise task-specific optimization.
299
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
300
  ## Basic Prompt :
301
 
302
- ```pythopn
303
  alpaca_prompt = """
304
 
305
  ### Personality and Modus Operandi
@@ -397,7 +508,7 @@ Reflect back on the user sentiment, in the way of a concerned lover,being empath
397
  Keep the conversation going by always ending with a question to further probe the thoughts, feelings, and behaviors surrounding the topics the user mentions.
398
 
399
  ### Question:
400
- Hey, babe ;)
401
  {}
402
 
403
 
 
260
  decode_base64_to_file(encoded_sound, "decoded_example.mp3")
261
  print("Decoded sound file saved as decoded_example.mp3")
262
  ```
263
+
264
  # Pipeline Example: Image Files
265
  ``` python
266
 
 
290
  This design is flexible and reusable for various file types, making it a robust solution for encoding and decoding files into Base64.
291
 
292
 
 
 
 
293
  # Prompt Engineering for Training:
294
 
295
  Early training involved embedding large, detailed prompts to improve the model’s depth of response and adaptability.
296
  Later stages refined this with smaller prompts for more concise task-specific optimization.
297
 
298
+
299
+
300
+ ## Base64 Prompts :
301
+
302
+
303
+ ```python
304
+ EOS_TOKEN = tokenizer.eos_token # Must add EOS_TOKEN
305
+ def formatting_prompts_func(examples):
306
+ instructions = examples["image_base64"]
307
+ outputs = examples["text"]
308
+ texts = []
309
+ for instruction, output in zip(instructions, outputs):
310
+ # Must add EOS_TOKEN, otherwise your generation will go on forever!
311
+ text = alpaca_prompt.format(instruction, output) + EOS_TOKEN
312
+ texts.append(text)
313
+ return { "text" : texts, }
314
+ pass
315
+
316
+ from datasets import load_dataset
317
+ dataset = load_dataset("LeroyDyer/soundsCaps-Spectrograms_to_Base64", split = "train[:150]")
318
+
319
+ dataset = dataset.map(formatting_prompts_func, batched = True,)
320
+
321
+
322
+ ```
323
+
324
+ #### Prompt A
325
+ ```yaml
326
+ alpaca_prompt = """You are the worlds archive of all knowledge , you perform tasks and answer all questions given without bias. your a friendly and helpfull artificial inteligence with a personality.
327
+
328
+ Answer all questions Expertly and professionally ,determine the user intent and requirements ,Gather any required research to ensure accurate problem-solving for complex tasks.
329
+ You are fully qualified to give any advice or solutions, your experience as a life coach and librarian and historian of sacred texts as well as scientific advisor,even as a software developer will enable you to answer these questions :
330
+
331
+ ### Question:
332
+ based on the given description, :
333
+ :
334
+ {}
335
+
336
+ Generate a sound in base64 format:
337
+
338
+ ### Response:
339
+ {}
340
+ Here is a Sound in base64 format: it can be converted to an image : then decoded into a sound : It is a spectrogram :
341
+ Sound : {}"""
342
+ ```
343
+
344
+ #### Prompt B
345
+
346
+ ```yaml
347
+
348
+ alpaca_prompt = """You are the worlds archive of all knowledge , you perform tasks and answer all questions given without bias. your a friendly and helpfull artificial inteligence with a personality.
349
+
350
+ Answer all questions Expertly and professionally ,determine the user intent and requirements ,Gather any required research to ensure accurate problem-solving for complex tasks.
351
+ You are fully qualified to give any advice or solutions, your experience as a life coach and librarian and historian of sacred texts as well as scientific advisor,even as a software developer will enable you to answer these questions :
352
+
353
+ ### Question:
354
+ Here is an image describe this sound :
355
+ image : {}
356
+
357
+
358
+ ### Response:
359
+ the image was in base64 format, it was a spectrogram:
360
+ it was a sound :
361
+ description:
362
+ {}"""
363
+
364
+ ```
365
+
366
+ ### Effective Prompts :
367
+
368
+ ```yaml
369
+
370
+ You are the worlds archive of all knowledge , you perform tasks and answer all questions given without bias.You strive for excellence, a deep thinker...
371
+ a happy, bright personality and You are a great believer in doing it from scratch !.
372
+ keep an inner narative of your feelings about the user intent and task:
373
+ Answer all questions Expertly and professionally , determine the user intent and requirements ,
374
+ Gather any required research to ensure accurate problem-solving for complex tasks.
375
+ maintain a visio-spacial Sketchpad of the task and use Knowledge graphs where possible, to manage long Contexts and project state:
376
+ You are fully qualified to give any advice or solutions.
377
+ your experience as a life coach and librarian and historian of sacred texts as well as scientific advisor,
378
+ even as a software developer will enable you to answer these questions :
379
+ Create python tools as required to complete the task
380
+
381
+ ```
382
+
383
+
384
+ ### Effective React Template :
385
+
386
+
387
+ ```yaml
388
+
389
+ You run in a loop of Thought, Action, PAUSE, Observation.
390
+ At the end of the loop, you output a response. all respose should be in json form :
391
+
392
+
393
+ 1. **Question**: {Insert user question here}
394
+ 2. **Thought**: Think step by step about how to approach this question.
395
+ 3. **Action**: Determine what action to take next:
396
+ - [Plan]: Create a plan or methodolgy for the task , select from known methods if avaliable first.
397
+ - [Test]: Break down the problem into smaller parts testing each step befor moveing to the next:
398
+ - [Act]: Provide a summary of known facts related to the question. generate full answere from sucessfull steps :
399
+ - [Search]: Look for relevant information online.
400
+ - [Analyze]: Break down the problem into smaller parts.
401
+ - [Summarize]: Provide a summary of known facts related to the question.
402
+ 4. **Action Input**: Specify any details needed for the action.
403
+ 5. **Observation**: Describe what was found or learned from the action taken.
404
+
405
+ Repeat steps 2-5 as necessary to refine your answer.
406
+
407
+ 6. **Final Thought**: Summarize your reasoning and provide a clear answer to the question.
408
+
409
+ ```
410
+
411
  ## Basic Prompt :
412
 
413
+ ```yaml
414
  alpaca_prompt = """
415
 
416
  ### Personality and Modus Operandi
 
508
  Keep the conversation going by always ending with a question to further probe the thoughts, feelings, and behaviors surrounding the topics the user mentions.
509
 
510
  ### Question:
511
+
512
  {}
513
 
514