name: wrapup description: Session-end checklist — verify state saved, learnings captured, everything committed; then report allowed-tools:
- Read
- Write
- Edit
- Bash
- Grep
- Glob
name: wrapup description: Session-end checklist — verify state saved, learnings captured, everything committed; then report allowed-tools:
A pattern for building personal knowledge bases using LLMs.
This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.
Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.
| import torch | |
| import torch.nn as nn | |
| import torch.nn.functional as F | |
| class MultiDimTrial(nn.Module): | |
| def __init__(self, input_shape, output_shape, num_demos, mode='train'): | |
| super(MultiDimTrial, self).__init__() | |
| self.name = 'MultiDimTrial' | |
| self.mode = mode |
| Understand the Task: Grasp the main objective, goals, requirements, constraints, and expected output. | |
| - Minimal Changes: If an existing prompt is provided, improve it only if it's simple. For complex prompts, enhance clarity and add missing elements without altering the original structure. | |
| - Reasoning Before Conclusions: Encourage reasoning steps before any conclusions are reached. ATTENTION! If the user provides examples where the reasoning happens afterward, REVERSE the order! NEVER START EXAMPLES WITH CONCLUSIONS! | |
| - Reasoning Order: Call out reasoning portions of the prompt and conclusion parts (specific fields by name). For each, determine the ORDER in which this is done, and whether it needs to be reversed. | |
| - Conclusion, classifications, or results should ALWAYS appear last. | |
| - Examples: Include high-quality examples if helpful, using placeholders [in brackets] for complex elements. | |
| - What kinds of examples may need to be included, how many, and whether they are complex enough to benefit from p |
I am investigating how to use Bend (a parallel language) to accelerate Symbolic AI; in special, Discrete Program Search. Basically, think of it as an alternative to LLMs, GPTs, NNs, that is also capable of generating code, but by entirely different means. This kind of approach was never scaled with mass compute before - it wasn't possible! - but Bend changes this. So, my idea was to do it, and see where it goes.
Now, while I was implementing some candidate algorithms on Bend, I realized that, rather than mass parallelism, I could use an entirely different mechanism to speed things up: SUP Nodes. Basically, it is a feature that Bend inherited from its underlying model ("Interaction Combinators") that, in simple terms, allows us to combine multiple functions into a single superposed one, and apply them all to an argument "at the same time". In short, it allows us to call N functions at a fraction of the expected cost. Or, in simple terms: why parallelize when we can share?
A
To be ran with:
claude-3-opus-202402290.0Context: https://twitter.com/VictorTaelin/status/1776677635491344744
| import torch | |
| from torch import nn | |
| import torch.nn.functional as F | |
| import torchvision | |
| import torchvision.transforms as transforms | |
| from tqdm import tqdm | |
| # Custom fast linear layer | |
| class FastLinear(nn.Module): | |
| def __init__(self, in_features, out_features): |
| #!/bin/bash | |
| # Default values | |
| MODEL="llama-2-13b-chat.ggmlv3.q4_0.bin" | |
| THREADS=8 | |
| NGL=1 | |
| COLOR="--color" | |
| C_FLAG=2048 | |
| TEMP=0.7 | |
| REPEAT_PENALTY=1.1 |
| # coding=utf-8 | |
| # Copyright 2023 The HuggingFace Inc. team. All rights reserved. | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software |
| <?php | |
| // half-hearted CSS minification | |
| $css = preg_replace( | |
| array('/\s*(\w)\s*{\s*/','/\s*(\S*:)(\s*)([^;]*)(\s|\n)*;(\n|\s)*/','/\n/','/\s*}\s*/'), | |
| array('$1{ ','$1$3;',"",'} '), | |
| file_get_contents('linked.css') | |
| ); | |
| // embed as a data: uri | |
| $base64css = rtrim(strtr(base64_encode($css), '+/', '-_'), '='); |