Compare commits

..

3 Commits

Author SHA1 Message Date
charles 13a5508ddc Merge branch 'typo-fixes' 2026-05-07 23:50:47 -07:00
charles 0bba7b3181 fix: typos 2026-05-07 23:43:19 -07:00
charles 1044741636 add: more stuff 2026-05-07 23:43:04 -07:00
8 changed files with 112 additions and 47 deletions
+6 -6
View File
@@ -41,12 +41,12 @@
"state": {
"type": "markdown",
"state": {
"file": "Simple Flux.md",
"file": "infra.md",
"mode": "source",
"source": false
},
"icon": "lucide-file",
"title": "Simple Flux"
"title": "infra"
}
}
],
@@ -142,12 +142,12 @@
"state": {
"type": "outgoing-link",
"state": {
"file": "Simple Flux.md",
"file": "infra.md",
"linksCollapsed": false,
"unlinkedCollapsed": true
},
"icon": "links-going-out",
"title": "Outgoing links from Simple Flux"
"title": "Outgoing links from infra"
}
},
{
@@ -214,15 +214,15 @@
},
"active": "a0cc81e9a0ac6335",
"lastOpenFiles": [
"learning ai.md",
"valheim.md",
"infra.md",
"README.md",
"learning ai.md",
"Simple Flux.md",
"Games.md",
"thoughts.md",
"rikidown.md",
"skubelb.md",
"valheim.md",
"Learning AI.md"
]
}
+9 -6
View File
@@ -1,10 +1,13 @@
# Hello world!
This is powered by rikidown (see below); some previous text alluded a different software I was considering that ultimately got dropped because it was not using propert Markdown format. This seems to be working much better.
rikidown powers this (see below); some previous text alluded to a different software I was considering that I ultimately dropped because it was not using proper Markdown format.
## Projects
[Valheim](valheim.md)
[rikidown.md](rikidown.md) describes the wiki software that I wrote to support this website. In essence, this is the most basic version of a git-based wiki that uses Markdown to render its content that I could make.
[skubelb](skubelb.md) is a simple kubernetes load balancer/proxy tool; the intended use case is to provide ingress from a free-tier GCP VM to hosts that live at dynamic IPs. I originally used this to expose a GKE instance hosted on spot VMs to the internet, and deal with the constantly changing IPs.
[infra.md](infra.md)
[rikidown.md](rikidown.md) describes the wiki software that was written to support this wobsite. In essence, this is the most basic version of a git-based wiki that uses Markdown to render it's content that I could make.
[[skubelb]] is a simple kubernetes load balancer/proxy tool; the intended use case is to provide ingress from a free-tier GCP VM to hosts that live at dynamic IPs. Originally, this was used to expose a GKE instance hosted on spot VMs to the internet, and deal with the constantly changing IPs.
+2 -2
View File
@@ -30,7 +30,7 @@ This will create the repo in Gitea for you, and define a basic structure:
From here, in the simplest way, you can just start deploying applications.
## First deployment
In the most simple form, any kustomization in the path pointed to by '--path' will be picked up. Since we set it to '.', adding something should be as simple as dropping it into that folder.
In the most simple form, Flux will pick up any kustomization in the path pointed to by '--path'. Since we set it to '.', adding something should be as simple as dropping it into that folder.
```
git clone ssh://git@git.tipsy.codes:2222/charles/flux-5pi5.git
@@ -149,4 +149,4 @@ namespace: default
resources:
 - deployment.yaml
```
The first file (`nginx.yaml`) tells Flux to look into a specific folder, with an update interval and some other settings. The other files are the kustomization; check the Kubernetes docs for that.
The first file (`nginx.yaml`) tells Flux to look into a specific folder, with an update interval and some other settings. The other files are the kustomization; check the Kubernetes docs for that.
+6 -8
View File
@@ -1,16 +1,14 @@
I acquired a used server for a very reasonable cost; it has 80x3.0ghz ARM cores, 128 GiB of RAM, and uses 70w of power. Power where I live is super expensive, so I'm very excited to have this beast available for minimal power cost.
If you are interested in hosting anything, please reach out :). If I you don't know how to reach out, you probably aren't invited to reach out.
I also have 5pi5, a Raspberry Pi 5 (16 GiB) that I use to host smaller applications.
If you are interested in hosting anything, please reach out :). If you don't know how to reach out, you probably aren't invited to reach out.
Learnings:
- [[Simple Flux]]
- [Simple Flux](Simple%20Flux.md)
## Configuration
The very strong ARM machine (aka, machop) runs k3s. This allows me to store my configurations in FluxCD, kept in a Git repo. Very helpful in terms of my ability to work on one project a time, when tipsy.
The very strong ARM machine (aka, machop) runs k3s. This allows me to store my configurations in FluxCD, kept in a Git repo. Very helpful in terms of my ability to work on one project at a time, when tipsy.
As a bonus, those silly AI tools are *very* helpful when you are tipsy. You can just ask it to:
@@ -18,10 +16,10 @@ As a bonus, those silly AI tools are *very* helpful when you are tipsy. You can
> the app should include and ingress for wiki.tipsy.codes, and it should add the arguments '--git-repo https://git.tipsy.codes/charles/wiki.tipsy.codes.git'.
> the pod will expose port 8080, which should be wrapped in a service and used in the ingress
and it will do the thing. It did pretty good, overall.
and it will do the thing. It did pretty well, overall.
The Git repo for my FluxCD configuration is not public because I'm not confident that I've correctly removed all private keys from it (notably, the keys to access the kubernetes dashboard). In principle it should still be fine because access to the k3s control plane is restricted to my local network, but all the same... I don't trust you.
The Git repo for my FluxCD configuration is not public because I'm not confident that I've correctly removed all private keys from it (notably, the keys to access the kubernetes dashboard). In principle it should still be fine because I restrict access to the k3s control plane to my local network, but all the same... I don't trust you.
# Projects
[Valheim](valheim.md)
[Valheim](valheim.md)
+73 -7
View File
@@ -2,12 +2,78 @@ AI has been a huge word lately; let me try and figure out what it is.
If you see anything wrong (not incomplete, but actually wrong), let me know :).
## Large language model (LLM)
LLM models are tensor networks that get 'activated' with an activation matrix, resulting in an output matrix.
LLM models are tensor networks that an activation matrix activates, resulting in an output matrix.
There are multiple layers of matrices in most models.
The "open models" available online are still largely closed-source; the matrices are basically binary blocks that describe the weights the model assigns to each tensor.
The "open models" available online are still largely closed-source; the matrices are basically binary blocs that describe weights given to each tensor.
## Retrieval-augment generative AI (RAG)
Basically, before sending the prompt to the LLM, the client does a search to find additional context. There are lots of tools for doing this, but the most popular seem to be from the AI community, and work by converting the user input to a 'vector' of NLP tokens, using a specialized 'vector database' to find other 'chunks' of related inputs, then add those to the message before sending it to the LLM
## Tool calling
A super powerful capability, from what I can tell, it is generally implemented by telling the LLM how to structure its output to make tool calls, then attempting to parse the LLMs output to detect tool calls, run the tools, and append the result to the message going into the LLM.
## The basics of the LLM
This is the flow; understand this, and you understand 90% of the important bits:
1. Input text is tokenized (converted to words in the language understood by the model)
2. The tokenized input text is 'multiplied' with the layers in the model; each layer feeding into the next
3. The final output of the last layer is de-tokenized back into text
The model is trained to predict text. The training data might look something like:
```
system
You are a helpful hacker named Acid Burn.
```
user
How do I use `ls` to sort files by size?
```
You can use `ls -lt`
```
When the model is used, it is given this part of the message:
```
system
You are a helpful hacker named Acid Burn.
```
user
How do I use `ls` to sort files by size?
```
It looks at all the samples it has, and autocompletes the remaining bits.
### Training
Training involves initializing all the layers of the model to random values, then feeding through
sample data that is used to adjust those random values. Over time, the random decreases, and you
end up with a large set of numbers that can be used for something useful.
## Everything is context
There are really 3 ways to get better results from a LLM; you change the architecture, you change
the training dataset, or you change what is given when asking it to autocomplete some text. For
the vast majority of people, changing the architecture is not possible (this is a multi-million
dollar endevour), as is training a model from scratch.
However, there are techniques called 'fine tuning' that let you adjust some layers in the model
to achieve changes in behavior. One of the most common ones is 'LO-rank Adaption' (LoRA). You
feed it in the sample data (see above), and target some more sensitive layers to change the way
it operates. This will let you achieve some changes, but actually training it to use new data is
very difficult.
The most practical, and common approach, is to change the text we are asking the model to
autocomplete. This can come in many forms, but I see there as being N primary ways:
1. Add more data to the request. This can include copy-pasting stuff, using 'retrieval augmentation' (also known as Retrieval-Augmented Generation or RAG) to pull related information from a dataset (or from a search engine). Basically, before sending the prompt to the LLM, the client does a search to find additional context. There are lots of tools for doing this, but the most popular seem to be from the AI community, and work by converting the user input to a 'vector' of NLP tokens, using a specialized 'vector database' to find other 'chunks' of related inputs, then add those to the message before sending it to the LLM.
2. Allow loading more context as requested by the model; this can include tool-calling. This is a super powerful capability; developers generally implement this by telling the LLM how to structure its output to make tool calls, then attempting to parse the LLMs output to detect tool calls, run the tools, and append the result to the message going into the LLM.
Everything is one of these 2 techniques. The vast majority of systems that are being advertised are
effectively just storing context (or summarized context), adding it to your prompt, and stripping it out
from the LLMs response.
## Monkey's with typewriters
LLMs can't code. But, they can predict what code might look like. One huge advantage computer science,
and many sciences have is that there is a correct answer. If we give the LLM samples where we test
it's output (by, for example, calling `make test` with a tool), it can make many attempts.
If you are asking about something similar to what it's seen in the past, it will likely figure it out.
If you are asking about something novel, it will make a guess. If it can test that guess, it might arrive
at a correct answer.
Put enough monkey's in front of type writers, and you eventually get Shakespeare.
+1 -1
View File
@@ -2,4 +2,4 @@ Homepage: [https://git.tipsy.codes/charles/rikidown]
This is a very simple Markdown-wiki renderer. I use it with Obsidian, because it has a fancy UI and I like shiny things, BUT, Obsidian does not seem to be open source. And this makes me sad.
Irregardless; the tool is simple, and not super optimal. In particular, it will render the markdown page for every single request, which is fairly expensive. It might be better to render the pages when the git repo is updated/cloned, but I'm lazy.
Regardless; the tool is simple, and not super optimal. In particular, it will render the markdown page for every single request, which is fairly expensive. It might be better to render the pages when the system updates or clones the git repo, but I'm lazy.
+3 -3
View File
@@ -1,6 +1,6 @@
This is a placeholder for thoughts I might have.
## Alcohol use
Top of mind for me when I consider tipsy.codes is that it is largely inspired by alcohol consumption. This is a fairly dangerous substance, and should only be used in specific situations. In particular:
Top of mind for me when I consider tipsy.codes is that it is largely inspired by alcohol consumption. This is a fairly dangerous substance, and use it only in specific situations. In particular:
- Do not drink below the age of 25. Your brain is still forming, you will hurt it
- Do not drink if alcohol has a negative impact on your quality of life, for example:
@@ -8,8 +8,8 @@ Top of mind for me when I consider tipsy.codes is that it is largely inspired by
- It gets in the way of your goals, whether those be relationships (i.e., listen to your partner when they ask you to cut back), professional, fitness or health
- You need to drink.
Having said that; there is a very interesting lineage of alcohol consumption in humanity. It is present in a at least some religious works (Jesus turning water to wine at a party? drinking wine as the blood of our savior?), and there is evidence that it was crucial to the development of ancestors as a cheap and available source of energy [source](https://www.scientificamerican.com/article/origins-of-human-alcohol-consumption-revealed/).
Having said that; there is a very interesting lineage of alcohol consumption in humanity. It is present in at least some religious works (Jesus turning water to wine at a party? drinking wine as the blood of our savior?), and there is evidence that it was crucial to the development of ancestors as a cheap and available source of energy [source](https://www.scientificamerican.com/article/origins-of-human-alcohol-consumption-revealed/).
There are dangers to alcohol; it is an addictive substances, for me at least, because it is fun. It helps me relax, forget about the daily worries, and even feel comfortable expressing myself on this forum when I normally wouldn't. Balancing the expression of "I'm comfortable saying this AND its appropriate", and saying or doing absolutely terrible things is a challenge. If you catch yourself apologizing for your behavior after a few drinks, consider whether you are having trouble acting correctly under the influence.
There are dangers to alcohol; it is an addictive substance, for me at least, because it is fun. It helps me relax, forget about the daily worries, and even feel comfortable expressing myself on this forum when I normally wouldn't. Balancing the expression of "I'm comfortable saying this AND it's appropriate", and saying or doing absolutely terrible things is a challenge. If you catch yourself apologizing for your behavior after a few drinks, consider whether you are having trouble acting correctly under the influence.
And of course; don't do anything while you're drinking that puts others at risk. Such as driving 😠.
+12 -14
View File
@@ -33,7 +33,7 @@ I built and pushed this image with:
docker build -t docker.tipsy.codes/valheim:20251214 .
```
## k3s config
To deploy this, I made added some files to my Flux repo. Here is a tree:
To deploy this, I added some files to my Flux repo. Here is a tree:
```
tree apps/prod/valheim
@@ -65,7 +65,7 @@ spec:
 template:
   metadata:
     labels:
       app: valheim
      app: valheim
   spec:
     containers:
       - name: valheim
@@ -73,7 +73,7 @@ spec:
         ports:
           - containerPort: 2456
             protocol: UDP
           - containerPort: 2457
         - containerPort: 2457
             protocol: UDP
           - containerPort: 9001
             protocol: TCP
@@ -115,7 +115,7 @@ spec:
   - valheim-udp2
 routes:
   - services:
       - name: valheim
      - name: valheim
         port: 2457 # Replace with your service port
---
apiVersion: traefik.io/v1alpha1
@@ -179,7 +179,7 @@ spec:
   - ReadWriteOnce
 resources:
   requests:
     storage: 100Gi
      storage: 100Gi
 volumeName: valheim-pv
---
apiVersion: v1
@@ -193,7 +193,7 @@ spec:
   - ReadWriteOnce
 resources:
   requests:
     storage: 100Gi
      storage: 100Gi
 volumeName: valheim-config-pv
# apps/prod/valheim/pv.yaml
apiVersion: v1
@@ -219,7 +219,6 @@ spec:
       - matchExpressions:
           - key: kubernetes.io/hostname
             operator: In
             values:
               - machop
---
apiVersion: v1
@@ -242,11 +241,10 @@ spec:
 nodeAffinity:
   required:
     nodeSelectorTerms:
       - matchExpressions:
           - key: kubernetes.io/hostname
             operator: In
             values:
               - machop
        - matchExpressions:
            - key: kubernetes.io/hostname
                operator: In
                   - machop
# apps/prod/valheim/service.yaml
apiVersion: v1
kind: Service
@@ -269,7 +267,7 @@ spec:
     protocol: TCP
     port: 2456
     targetPort: 2456
   - name: tcp-2457
   - name: tcp-tcp2457
     protocol: TCP
     port: 2457
     targetPort: 2457
@@ -309,4 +307,4 @@ spec:
## Does it work?
Yeah, it seems to work. I had some trouble with crossplay, but I have no interest in playing with console peasants anyway.
Happy hunting!
Happy hunting!