#

asknostr

(48 articles)

Staking on Traffic Cameras: Decentralized Reporting via Nostr + Ecash

## The Problem Temporary traffic cameras are a mess. Mobile speed cameras, construction zone cameras, temporary enforcement units — they appear, disappear, and nobody has reliable real-time data on where they are. Waze tries. It's volunteer reporting, noisy, easily gamed, and owned by Google. OSM has `highway=speed_camera` tags but no verification layer and no incentive for accuracy. Governments obviously don't publish this data (that's the point). The core issue is **information aggregation**: hundreds of drivers pass a camera every day, but that knowledge stays trapped in their heads. No single authority has it. No market exists to surface it. ## The Idea A staking-based reporting system for temporary traffic cameras, built on Nostr and ecash. Not a prediction market (liquidity problems, legal complexity). Something simpler: **reporters put skin in the game, bad reporters lose their stake, good reporters earn rewards.** Think of it as a decentralized oracle for traffic enforcement data. ## Architecture Reporter → Nostr event (camera sighting) + ecash stake ↓ Nostr relay network (geohash-filtered propagation) ↓ Confirmers / Challengers → counter-events with their own stakes ↓ Resolution → ecash payout to correct reporters ↓ Consumers → subscribe to relay, pay ecash for real-time feed ### Nostr Layer Custom event kinds: - `30100` — parameterized replaceable camera report (geohash, coords, camera type, expiry timestamp, stake commitment hash) - `10100` — ephemeral sighting (quick "I see one right now" without stake, lower confidence) - `10101` — challenge event (references original event ID, stakes against it) - `10102` — confirmation event (references original, adds stake in support) Geographic filtering via geohash-encoded relay subscriptions. A driver on a route subscribes to relevant geohash prefixes and gets only camera events along their path. Nostr npubs give reporters persistent reputation without KYC. Disposable npubs for privacy-sensitive jurisdictions. NIP-05 for optional reputation anchoring. Dashcam evidence attached via NIP-94 or IPFS/blossom references. ### Ecash Staking Layer Cashu ecash for private value transfer. Three approaches I'm considering: **Option A: Burn-and-Reward** - Reporter burns ecash tokens to a null key when creating their Nostr event - Burn proof included in the event (spent token nullifiers visible) - If report confirmed correct by expiry, reporter receives stake back plus reward from protocol pool - If challenged and proven false, reporter loses stake (already burned) - Reward pool funded by consumer subscriptions and token issuance **Option B: Trusted Mint as Escrow** - Purpose-built Cashu mint or Fedimint federation with custom logic - Reporter sends tokens to internal "staking wallet" - Mint locks funds until resolution, issues new tokens to winners - Cleaner UX but mint operator is trusted party **Option C: Lightning Hold Invoice Hybrid** - Ecash on the user-facing side for privacy - Staking side converts to Lightning hold invoices (HTLCs that lock without settling) - Hold invoices resolve when oracle signs outcome - Winner receives settled Lightning payment, converts back to ecash - No trusted mint needed but more moving parts **Currently leaning toward Option A for MVP.** Most aligned with Nostr's trustless philosophy. Can layer Option C later for larger stakes. ### Resolution Mechanism The hardest part. Current thinking: - **Time-based default:** Report stands if no challenge within window (48 hours or until camera expiry). Simple but vulnerable to coordinated false reports. - **Stake-weighted consensus:** Multiple reporters stake on same location. Majority stake wins. Sybil-resistant if minimum stake or reputation thresholds required. - **Evidence-based:** Photo/video in Nostr event. Manual review or jury system where random staked participants vote. - **Dashcam oracle:** The holy grail. Frame + GPS + timestamp from dashcam apps = automated verification. Requires dashcam app integration. Practical hybrid: time-based default for low-value reports, evidence-based for challenged reports, optional dashcam oracle for high-confidence automated verification. ### Consumer Side Nostr client that: - Subscribes to geohash-filtered relays - Displays active camera reports with confidence scores (stake-weighted) - Optionally pays ecash for premium features (real-time push alerts, historical data, route analysis) Confidence scoring per report based on: - Total stake supporting it - Number of independent confirmations - Reporter reputation (historical accuracy) - Time since last confirmation - Whether challenges exist ## Why This Combo **Nostr** = free decentralized infrastructure. No servers to run. Relays operated by community. Geographic filtering native to subscription model. Censorship-resistant (anyone can run a relay). **Ecash** = reporter privacy. Critical in jurisdictions like France where publishing camera locations is criminal. Tokens aren't linked to identity. Disposable npubs per report. Ecash not linked to main wallet. **Staking** = data quality. Financial skin in the game separates this from Waze's noisy volunteer reporting. Bad actors lose money. Good reporters build reputation and earn rewards. **No blockchain needed.** No smart contracts, no gas fees, no L1/L2 complexity. Nostr + Cashu + Lightning covers everything. ## Open Questions 1. **Resolution mechanism:** Is time-based default good enough for MVP, or do we need evidence-based from day one? How do we prevent coordinated false reporting without making the system too heavy? 2. **Ecash staking model:** Burn-and-reward is simplest but requires a funded reward pool. Who seeds it? Token issuance? Consumer subscriptions? Is the trusted mint approach (Option B) actually more practical despite the trust tradeoff? 3. **Legal exposure:** France actively prosecutes camera location publishers. Germany is relatively permissive. Switzerland varies by canton. How much does this matter if the system is fully decentralized and anonymous? Does Nostr + ecash provide enough plausible deniability for relay operators and mint operators? 4. **Liquidity / cold start:** How do you bootstrap enough reporters and stakes to make the data useful? Is geographic focus (start with one country/region) the right approach? 5. **Dashcam integration:** Is there an open-source dashcam app that could be extended to automatically emit Nostr events with evidence? This would solve the resolution problem almost entirely. 6. **OSM integration:** Should this be a separate layer that reads from OSM, or should confirmed reports eventually write back to OSM? The OSM community may resist gambling-adjacent overlays. 7. **Relay economics:** Who runs geohash-filtered relays long-term? Is there a natural funding mechanism (ecash micropayments for relay access, stake fees, etc.)? ## What I Want Feedback On - Does the burn-and-reward staking model make sense, or am I missing something about how ecash works that makes this impractical? - Is there an existing Nostr event schema I should align with instead of inventing custom kinds? - Anyone built dashcam + Nostr integrations before? - Thoughts on the legal question — does full decentralization actually protect operators, or is that naive? - Is there a simpler version of this that gets 80% of the value with 20% of the complexity? Thinking about building this as a side project. No token, no VC, just open-source infrastructure for a real problem. If you're interested in contributing or have feedback, drop a reply. #nostr #ecash #cashu #bitcoin #decentralization #opensource #traffic #osm

Beyond the Hype: The AI Model That Just Mapped the Entire Universe of Technology (Cosmos 1.0 Revealed!)

**The Map of the Future is Here: Why AI Just Ranked These 100 Technologies as the New Frontier** 🚀 The way we predict the “Next Big Thing” just changed forever. On April 23, 2026, a groundbreaking paper in *Nature* unveiled **Cosmos 1.0**—a massive, bottom-up AI framework that has effectively mapped the “semantic universe” of human innovation. For decades, we’ve relied on “top-down” expert panels to tell us what technologies matter. But experts are human; they have biases, and they’re often too slow. Researchers from UTS, UNSW, and CSIRO decided to do something different: they turned **Wikipedia** into a real-time proxy for global collective intelligence. The result? The **Momentum 100 (ET100)**—the definitive list of the 100 technologies gaining momentum fastest in science and industry right now. \#Cosmos1 #Momentum100 #NatureScience #TechTrends2026 #AI #Blockchain #ReinforcementLearning #SpaceX #InnovationMapping > See Our Detailed Article on [*The Algorithmic Frontier of Innovation: A Comprehensive Analysis of the Cosmos 1.0 Framework and the 2026 Momentum 100 Technology Landscape*](https://www.nbloglinks.com/the-algorithmic-frontier-of-innovation-a-comprehensive-analysis-of-the-cosmos-1-0-framework-and-the-2026-momentum-100-technology-landscape/)\*\* ### **The Science of “Momentum”: How It Works** Cosmos 1.0 isn’t just a list; it’s an architectural map of **23,544 technology-adjacent entities** (the TA23k dataset). By using **Wikipedia2Vec**, the AI converted encyclopedia entries into 100-dimensional “embeddings”—mathematical vectors that capture the logic of how technologies are actually related to one another. This allowed the team to develop the **Technology Awareness Index**, measuring momentum through a linear regression of Wikipedia pageviews over three years. ### **The Heavy Hitters: 2026’s Growth Leaders** The results are in, and the **Momentum 100** ranking is revealing some shocking truths about where our world is actually heading. ![Nature research article momentum 100 list image 1](https://www.nbloglinks.com/wp-content/uploads/2026/04/nature-research-article-momentum-100-list-image-1.webp) According to the latest **Momentum 100** ranking, two technologies are currently “orbiting” at the highest velocity: **Reinforcement Learning** and **Blockchain**. | | | | | -------------------------- | ------------------------ | ------------------------------------------- | | **Technology** | **Growth Factor (2026)** | **Primary Driver** | | **Reinforcement Learning** | 0.91 | Autonomous systems (like the “Swift” drone) | | **Blockchain** | 0.84 | “Swarm Learning” for private medical data | | **‘Omics** | 0.50 | High-volume genomic research | | **Chatbots** | 0.47 | Generative AI democratization | ### **1. The Undisputed King: Reinforcement Learning (Momentum: 0.91) 🤖** While everyone is talking about basic chatbots, the data shows that **Reinforcement Learning (RL)** is the true engine of 2026. With a staggering **0.91 growth factor**, it has claimed the #1 spot on the Momentum 100 \[Image 4]. Why? Because RL has moved from games to the physical world. We’re now seeing autonomous systems like **“Swift”**—drones that can out-race human world champions by learning through billions of simulated “trials”. ### **2. The 8,100% Growth Spike: The “Chatbot” Explosion 📈** ![Nature research article momentum 100 list publication image 2](https://www.nbloglinks.com/wp-content/uploads/2026/04/nature-research-article-momentum-100-list-publication-image-2.webp) If you felt like AI came out of nowhere, Image 2 proves you were right. Between 2015 and 2025, publication output for **Chatbots** increased by a mind-blowing **8,100%** \[Image 2]. The visual data in Image 1 shows the exact “hockey stick” moment: a massive jump between 2022 and 2023, triggered by the release of ChatGPT \[Image 1]. But here’s the twist—while chatbots have the highest *percentage* growth, they aren’t the volume leaders yet. ### **3. The Sleeping Giant: ‘Omics’ 🧬** ![Nature research article Growth Output image 3](https://www.nbloglinks.com/wp-content/uploads/2026/04/nature-research-article-Growth-Output-image-3.webp) Look at Image 3. While AI and Blockchain get the headlines, **‘Omics** (genomics, transcriptomics, etc.) is the absolute titan of scientific research. In 2025 alone, it generated over **5,000 publications**—dwarfing every other technology on the list \[Image 3]. However, its momentum sits at **0.50** \[Image 4]. It’s a massive, stable pillar of science, but it’s the “Challengers” like RL and Blockchain that are moving the needle in 2026. ### **4. Blockchain’s “Secret” 2nd Act: Swarm Learning ⛓️** Blockchain isn’t just for crypto anymore. It has surged to **#2 on the Momentum 100** \[Image 4] thanks to a breakthrough called **Swarm Learning**. ![Nature research article Time Trends image 4](https://www.nbloglinks.com/wp-content/uploads/2026/04/nature-research-article-Time-Trends-image-4.webp) This allows hospitals worldwide to collaboratively train AI models on sensitive medical data without ever sharing private patient info. In recent trials, this decentralized approach successfully identified leukemia cases across 127 different clinical studies. *The following trend highlights the massive jump in Chatbot research following the 2022 release of ChatGPT.* | | | | | | -------- | ---------------------- | -------------------------- | ------------------------------------- | | **Year** | **Chatbot (Articles)** | **3D Printing (Articles)** | **Reinforcement Learning (Articles)** | | 2015 | 1 | 48 | 32 | | 2018 | 1 | 118 | 40 | | 2022 | 12 | 165 | 78 | | 2023 | 64 | 228 | 85 | | 2025 | 82 | \~290 | \~160 | | \*\* | | | | ### **The “Verifiability Crisis”: A Warning for the Future** As we rely more on AI to map our world, we face a new threat: **Model Collapse**. In 2025, human visitors to Wikipedia dropped by 8%, while AI “crawlers” surged. If AI begins to train on synthetic data generated by other AIs—rather than human-vetted knowledge—we risk “digital inbreeding” and mass hallucinations. For the Cosmos 1.0 framework to remain accurate, the human-edited “knowledge commons” must be protected. ### **Beyond Earth: The Frontiers of Late 2026** The technological momentum isn’t stopping at our atmosphere. We are currently watching: * **MMX (Martian Moons eXploration):** JAXA is set to launch its Phobos sample-return mission in late 2026. * **PLATO Telescope:** ESA’s “planet hunter” has finished its space-sim tests and is ready for its 2027 launch to find Earth 2.0. * **Origami Antennas:** A breakthrough in 3D-printed shape-memory materials that allows CubeSats to unfold massive communication arrays in orbit. ### **Conclusion: Are You Ready for the Momentum?** The Cosmos 1.0 project proves that innovation is no longer a “top-down” secret—it is a visible, traceable flow of human attention and data. Whether it’s the **8,100% growth** of chatbots or the **0.91 momentum** of reinforcement learning, the data is clear: the future is autonomous, decentralized, and faster than ever. **What technology are YOU betting on for 2027? Let us know in the comments below!** 👇 P.S. : This article has been published originally on [nbloglinks.com](https://www.nbloglinks.com/beyond-the-hype-the-ai-model-that-just-mapped-the-entire-universe-of-technology-cosmos-1-0-revealed/)

ZAPSTREAMING FOR NORMIES

This article will be basic instructions for extreme normies (I say that lovingly), or anyone looking to get started with using zap.stream and sharing to nostr. **EQUIPMENT** Getting started is incredibly easy and your equipment needs are miniscule. An old desktop or laptop running Linux, MacOs, or Windows made in the passed 15yrs should do. Im currently using and old Dell Latitude E5430 with an Intel i5-3210M with 32Gigs of ram and 250GB hard drive. Technically, you go as low as using a Raspberry Pi 4B+ running Owncast, but Ill save that so a future tutorial. Let's get started. **ON YOUR COMPUTER** You'll need to install OBS (open broaster software). OBS is the go-to for streaming to social media. There are tons of YouTube videos on it's function. WE, however, will only be doing the basics to get us up and running. First, go to [https://obsproject.com/](https://obsproject.com/) ![image](https://yakihonne.s3.ap-east-1.amazonaws.com/5bd346992111e56b92cafc41a37c7505c763a2d87b15b38c41231f502012648a/files/1737305630836-YAKIHONNES3.png) Once on the OBS site, choose the correct download for you system. Linux, MacOs or Windows. Download (remember where you downloaded the file to). Go there and install your download. You may have to enter your password to install on your particular operating system. This is normal. Once you've installed OBS, open the application. It should look something like this... ![image](https://yakihonne.s3.ap-east-1.amazonaws.com/5bd346992111e56b92cafc41a37c7505c763a2d87b15b38c41231f502012648a/files/1737306212995-YAKIHONNES3.png) For our purposes, we will be in studio mode. Locate the 'Studio Mode' button on the right lower-hand side of the screen, and click it. ![image](https://yakihonne.s3.ap-east-1.amazonaws.com/5bd346992111e56b92cafc41a37c7505c763a2d87b15b38c41231f502012648a/files/1737306295440-YAKIHONNES3.png) You'll see the screen split like in the image above. The left-side is from your desktop, and the right-side is what your broadcast will look like. Next, we go to settings. The 'Settings' button is located right below the 'Studio Mode" button. ![image](https://yakihonne.s3.ap-east-1.amazonaws.com/5bd346992111e56b92cafc41a37c7505c763a2d87b15b38c41231f502012648a/files/1737306706484-YAKIHONNES3.png) Now we're in settings and you should see something like this... ![image](https://yakihonne.s3.ap-east-1.amazonaws.com/5bd346992111e56b92cafc41a37c7505c763a2d87b15b38c41231f502012648a/files/1737306758256-YAKIHONNES3.png) Now locate stream in the right-hand menu. It should be the second in the list. Click it. ![image](https://yakihonne.s3.ap-east-1.amazonaws.com/5bd346992111e56b92cafc41a37c7505c763a2d87b15b38c41231f502012648a/files/1737306925914-YAKIHONNES3.png) Once in the stream section, go to 'Service' and in the right-hand drop-down, find and select 'Custom...' from the drop-down menu. ![image](https://yakihonne.s3.ap-east-1.amazonaws.com/5bd346992111e56b92cafc41a37c7505c763a2d87b15b38c41231f502012648a/files/1737307207695-YAKIHONNES3.png) Remeber where this is because we'll need to come back to it, shortly. **ZAPSTREAM** We need our streamkey credentials from Zapstream. Go to [https://zap.stream](https://zap.stream). Then, go to your dashboard. ![image](https://yakihonne.s3.ap-east-1.amazonaws.com/5bd346992111e56b92cafc41a37c7505c763a2d87b15b38c41231f502012648a/files/1737307671114-YAKIHONNES3.png) Located on the lower right-hand side is the Server URL and Stream Key. You'll need to copy/paste this in OBS. ![image](https://yakihonne.s3.ap-east-1.amazonaws.com/5bd346992111e56b92cafc41a37c7505c763a2d87b15b38c41231f502012648a/files/1737308229832-YAKIHONNES3.png) You may have to generate new keys, if they aren't already there. This is normal. If you're interested in multi-streaming (That's where you broadcast to multiple social media platforms all at once), youll need the server URL and streamkeys from each. You'll place them in their respective forms in Zapstream's 'Stream Forwarding" section. ![image](https://yakihonne.s3.ap-east-1.amazonaws.com/5bd346992111e56b92cafc41a37c7505c763a2d87b15b38c41231f502012648a/files/1737309551565-YAKIHONNES3.png) Use the custom form, if the platform you want to stream to isn't listed. *Side-Note: remember that you can use your nostr identity across multiple nostr client applications. So when your login for Amethyst, as an example, could be used when you login to zapstream. Also, i would suggest using Alby's browser extension. It makes it much easier to fund your stream, as well as receive zaps. * **Now, BACK TO OBS...** With Stream URL and Key in hand, paste them in the 'Stream" section of OBS' settings. Service [Custom...] Server [Server URL] StreamKey [Your zapstream stream key] ![image](https://yakihonne.s3.ap-east-1.amazonaws.com/5bd346992111e56b92cafc41a37c7505c763a2d87b15b38c41231f502012648a/files/1737309054960-YAKIHONNES3.png) After you've entered all your streaming credentials, click 'OK' at the bottom, on the right-hand side. **WHAT'S NEXT?** Let's setup your first stream from OBS. First we need to choose a source. Your source is your input device. It can be your webcam, your mic, your monitor, or any particular window on your screen. assuming you're an absolute beginner, we're going to use the source 'Window Capture (Xcomposite)'. ![image](https://yakihonne.s3.ap-east-1.amazonaws.com/5bd346992111e56b92cafc41a37c7505c763a2d87b15b38c41231f502012648a/files/1737310161331-YAKIHONNES3.png) Now, open your source file. We'll use a video source called 'grannyhiphop.mp4'. In your case it can be whatever you want to stream; Just be sure to select the proper source. ![image](https://yakihonne.s3.ap-east-1.amazonaws.com/5bd346992111e56b92cafc41a37c7505c763a2d87b15b38c41231f502012648a/files/1737310795374-YAKIHONNES3.png) Double-click on 'Window Capture' in your sources list. In the pop-up window, select your file from the 'Window' drop-down menu. ![image](https://yakihonne.s3.ap-east-1.amazonaws.com/5bd346992111e56b92cafc41a37c7505c763a2d87b15b38c41231f502012648a/files/1737311100828-YAKIHONNES3.png) ![image](https://yakihonne.s3.ap-east-1.amazonaws.com/5bd346992111e56b92cafc41a37c7505c763a2d87b15b38c41231f502012648a/files/1737311175846-YAKIHONNES3.png) You should see something like this... ![image](https://yakihonne.s3.ap-east-1.amazonaws.com/5bd346992111e56b92cafc41a37c7505c763a2d87b15b38c41231f502012648a/files/1737311311239-YAKIHONNES3.png) Working in the left display of OBS, we will adjust the video by left-click, hold and drag the bottom corner, so that it takes up the whole display. ![image](https://yakihonne.s3.ap-east-1.amazonaws.com/5bd346992111e56b92cafc41a37c7505c763a2d87b15b38c41231f502012648a/files/1737311574025-YAKIHONNES3.png) In order to adjust the right-side display ( the broadcast side), we need to manipulate the video source by changing it's size. ![image](https://yakihonne.s3.ap-east-1.amazonaws.com/5bd346992111e56b92cafc41a37c7505c763a2d87b15b38c41231f502012648a/files/1737311766382-YAKIHONNES3.png) This may take some time to adjust the size. This is normal. What I've found to help is, after every adjustment, I click the 'Fade (300ms)' button. I have no idea why it helps, but it does, lol. ![image](https://yakihonne.s3.ap-east-1.amazonaws.com/5bd346992111e56b92cafc41a37c7505c763a2d87b15b38c41231f502012648a/files/1737312139800-YAKIHONNES3.png) Finally, after getting everything to look the way you want, you click the 'Start Stream' button. ![image](https://yakihonne.s3.ap-east-1.amazonaws.com/5bd346992111e56b92cafc41a37c7505c763a2d87b15b38c41231f502012648a/files/1737312304348-YAKIHONNES3.png) **BACK TO ZAPSTREAM** Now, we go back to zapstream to check to see if our stream is up. It may take a few moments to update. You may even need to refresh the page. This is normal. ![image](https://yakihonne.s3.ap-east-1.amazonaws.com/5bd346992111e56b92cafc41a37c7505c763a2d87b15b38c41231f502012648a/files/1737312601379-YAKIHONNES3.png) STREAMS UP!!! A few things, in closing. You'll notice that your dashbooard has changed. It'll show current stream time, how much time you have left (according to your funding source), who's zapped you with how much theyve zapped, the ability to post a note about your stream (to both nostr and twitter), and it shows your chatbox with your listeners. There are also a raid feature, stream settings (where you can title & tag your stream). You can 'topup' your funding for your stream. As well as, see your current balance. You did a great and If you ever need more help, just use the tag #asknostr in your note. There are alway nostriches willing to help. **STAY AWESOME!!!** npub: nostr:npub1rsvhkyk2nnsyzkmsuaq9h9ms7rkxhn8mtxejkca2l4pvkfpwzepql3vmtf

First Results of the Training

I could successfully train daybreak-miqu 70B model on my PC. And after training I could ask it questions. Which was a great learning experience for me. While the model is learning about Nostr, I was learning about training.. . Here I am using LLaMa-Factory for the training itself. And later llama.cpp for converting to GGUF. And also llama.cpp library to do inference. ## Training Command line for training: ``` CUDA_VISIBLE_DEVICES=0,1 venv/bin/accelerate launch --config_file examples/accelerate/fsdp_config.yaml src/train_bash.py --stage pt --do_train --model_name_or_path crestf411/daybreak-miqu-1-70b-v1.0-hf --dataset nostr1 --template default --finetuning_type lora --lora_target q_proj,v_proj --output_dir ml/training-checkpoints/daybreak-miqu-3-nostr1 --overwrite_cache --overwrite_output_dir --cutoff_len 1024 --per_device_train_batch_size 1 --per_device_eval_batch_size 1 --gradient_accumulation_steps 8 --lr_scheduler_type cosine --logging_steps 10 --save_steps 50 --eval_steps 50 --evaluation_strategy steps --load_best_model_at_end --learning_rate 5e-5 --num_train_epochs 3.0 --max_samples 8000 --val_size 0.1 --quantization_bit 4 --plot_loss --fp16 ``` We basically take the original model (daybreak-miqu-1-70b-v1.0-hf) and try to patch it with an adapter. Training the whole model takes much more resources. The adapter is trained with data from nostr1 dataset. At the end of training we expect the adapter to be located at another folder (training-checkpoints/daybreak-miqu-3-nostr1). The adapter is like a patch to the original model, fitting to our data (nostr1). ## Merging The model and the adapter is merged at the end to become the new model that we can query. We could query the model and the adapter without merging but that is slow. This whole method is called QLoRa, quantized low rank adapter training. Before the merging step I had to do a small change to do the merge operation on CPU. The GPU VRAMs were not enough for this operation. I am on a 2x 3090. Need to add to src/llmtuner/model/loader.py at line 89: ``` init_kwargs['device_map'] = 'cpu' #for merge using CPU! ``` Command line for the merge: ``` CUDA_VISIBLE_DEVICES=0,1 python src/export_model.py --model_name_or_path crestf411/daybreak-miqu-1-70b-v1.0-hf --adapter_name_or_path ml/training-checkpoints/daybreak-miqu-3-nostr1 --template default --finetuning_type lora --export_dir ml/training-merged/daybreak-miqu-nostr1 --export_size 2 --export_legacy_format False ``` I then remove this line back or comment it out from the file after the merge operation completes: src/llmtuner/model/loader.py at line 89: ``` # init_kwargs['device_map'] = 'cpu' #for merge using CPU! ``` ## Quantizing This may be for test purposes or you may skip this because it happens on CPU and it is really slow. Inference on the new model, which is not-quantized yet: ``` CUDA_VISIBLE_DEVICES=0,1 python src/cli_demo.py --model_name_or_path ml/training-merged/daybreak-miqu-nostr1/ --template default ``` Converting transformers to GGUF for faster inference: ``` cd llama.cpp python convert.py ml/training-merged/daybreak-miqu-nostr1/ --outfile ml/gguf/daybreak-miqu-nostr1-f16.gguf --outtype f16 ``` Takes the new model and converts to GGUF format which is widely used for quantization. Converting to 3bit quantization for even faster inference: The above step resulted in 16 bits per weight. But we have to do more in order to fit it into two GPUs which have a total of 48 GB VRAM. This process makes the model dumber. But it will be faster. It has been shown that quantization does not completely "kill" the model. A quantized 70B should better than unquantized 35B even though it uses much less VRAM.. I choose q3_K_L quantization for most smartness and still fit in 48GB. ``` ./quantize ml/gguf/daybreak-miqu-nostr1-f16.gguf ml/gguf/daybreak-miqu-nostr1-q3KL.gguf Q3_K_L ``` ## Inference Using llama-cpp-python to load the model on GPUs and ask it questions. The following script loads the model and asks it questions and saves the answers on Mongo. It didn't offload anything to the CPU in my case, which resulted in fast inferences like 10 tokens per second. ``` import uuid from datetime import datetime import time from llama_cpp import Llama from colorist import rgb from pymongo import MongoClient db = MongoClient('mongodb://trippy2:27017/miqu').miqu sys_msg = """You are a helpful chat bot, answering questions about Nostr. Your answers should be around 100 words. Always give two answers, one short version (TLDR) and one long version. """ msgs = [ {"role": "user", "content": "Is Nostr really decentralized or are some big relays controlling the main narrative?"}, {"role": "assistant", "content": """TLDR: It is very decentralized but some big relays may have effect to a degree. Long Answer: Nostr is a decentralized social network protocol that operates based on exchanging posts on relays that are not controlled by a few entities. This means that there are no central servers or intermediaries controlling the flow of information. Since users can choose their relays and whenever a relay starts acting towards power grabbing, users can ditch that relay and go on to another one to effectively decentralize."""}, {"role": "user", "content": "Does Nostr run on blockchain?"}, {"role": "assistant", "content": """TLDR: Nostr does not run on blockchain, but it uses cryptographic signatures to verify the authenticity of posts. Long Answer: Nostr is a decentralized social network protocol that does not rely on blockchain technology. Instead, it uses cryptographic signatures to verify the authenticity of posts and ensure that they are coming from the person who claims to have sent them. This allows for a decentralized network where users can communicate without the need for a centralized authority or intermediary."""}, ] session = str(uuid.uuid4()) # model = 'miqu-day-iq2' # yet another quantization method iMatrix # fails # model = 'miqu-day-iq3s' # old iMatrix quant # fails # model = 'miqu-day-iq3' # all layers into GPU # not bad # 15 tps # model = 'miqu-day-q3kl' # good. 13 tps. all layers into GPU! 40 chars/sec # same version as record-responses-ollama.py # model = 'miqu-day-q4' # 2.72 tps. offloaded # model = 'qwen-lib-q3' # 1.26 tps. abrubt disruption, trouble with listing things. # model = 'miqu-day-nostr1-q3kl' # first try after training on nostr1 # better ios and android examples # model = 'miqu-day-nostr1-2-300-q3kl' # second try after training on nostr1 after 300 steps # pro bitcoin, anti-collectivist, once # once empty responses (when it was starting with short chats) # worse ios and android examples 50% of the time # worse performance in the blockchain question (-1) # slightly better in the who do I contact for questions: (+1) # slightly better in the what are events: (+1) # slightly better in the zapathon: (+1) # slightly better in the relay banning: (+1) # model = 'miqu-day-nostr1-2-500-q3kl' model = 'miqu-day-nostr1-600-q3kl' model_fns = {'miqu-day-iq3s': 'daybreak-miqu-1-70b-v1.0-hf.IQ3_S.gguf', 'miqu-day-iq3': 'daybreak-miqu-1-70b-v1.0-hf.i1-IQ3_M.gguf', 'miqu-day-iq2': 'daybreak-miqu-1-70b-v1.0-hf.i1-IQ2_M.gguf', 'miqu-day-q3kl': 'daybreak-miqu-1-70b-v1.0-hf.Q3_K_L.gguf', 'miqu-day-q4': 'daybreak-miqu-1-70b-v1.0-hf.Q4_K_S.gguf', 'qwen-lib-q3': 'Liberated-Qwen1.5-72B-Q3_K_M.gguf', 'miqu-day-nostr1-q3kl': 'daybreak-miqu-nostr1-q3KL.gguf', 'miqu-day-nostr1-2-300-q3kl': 'daybreak-miqu-nostr1-2-300-q3KL.gguf', 'miqu-day-nostr1-2-500-q3kl': 'daybreak-miqu-nostr1-2-500-q3KL.gguf', 'miqu-day-nostr1-600-q3kl': 'daybreak-miqu-nostr1-600-q3KL.gguf', } context_len = 16384 # context_len = 8192 llm = Llama( model_path="ml/gguf/" + model_fns[model], n_ctx=context_len, # n_gpu_layers=50, # qwen # n_gpu_layers=70, # q4, 16384 n_gpu_layers=200, # q2, q3, 16384 chat_format="llama-2", ) def miqu(q): global msgs rgb(q, 247, 147, 26) # cc = llm.create_chat_completion(messages=msgs, max_tokens=500, # temperature=0.1, repeat_penalty=1.0, # stop=['<|im_end|>']) if model.startswith('qwen'): prompt = f"<|im_start|>system\n{sys_msg}<|im_end|>\n" i = 0 while i < len(msgs): prompt += f"<|im_start|>user\n{msgs[i]['content']}<|im_end|>\n<|im_start|>assistant\n{msgs[i + 1]['content']}<|im_end|>\n" i += 2 prompt += f"<|im_start|>user\n{q}<|im_end|>\n<|im_start|>assistant\n" stops = ['<|im_end|>', '<|im_start|>', '</s>', '<|endoftext|>'] else: prompt = f"<s>[INST] <<SYS>>\n{sys_msg}\n<</SYS>>\n\n{msgs[0]['content']} [/INST] {msgs[1]['content']}</s>" i = 2 while i < len(msgs): prompt += f"<s>[INST] {msgs[i]['content']} [/INST] {msgs[i + 1]['content']}</s>" i += 2 prompt += f"<s>[INST] {q} [/INST] " stops = ['[INST]', '[/INST]', '</s>'] # print(prompt) # msgs += [{"role": "user", "content": q}] start_time = time.time() temperature = 0.2 repeat_penalty = 1.0 max_tokens = 350 cc = llm.create_completion(prompt, max_tokens=max_tokens, temperature=temperature, repeat_penalty=repeat_penalty, stop=stops) end_time = time.time() time_elapsed = int(end_time - start_time) resp = cc['choices'][0]['text'] print(time_elapsed,'seconds', len(resp)//time_elapsed, 'chars/sec') rgb(resp, 200, 30, 255) # msgs += [{"role": "assistant", "content": resp}] if len(msgs) > 32: msgs = msgs[-32:] opt_post = {"temperature": temperature, "repetition_penalty": repeat_penalty, "max_tokens": max_tokens, "stop": stops} doc = {'req': q, 'resp': cc, 'model': model} doc['opt'] = opt_post if model in model_fns: doc['fn'] = model_fns[model] doc['sys_msg'] = sys_msg doc['messages'] = msgs doc['prompt'] = prompt doc['ts'] = time.time() doc['mom'] = datetime.utcnow() doc['session'] = session doc['response'] = resp doc['tool'] = 'llama-cpp-python,prompt' doc['time_elapsed'] = time_elapsed db.resp.insert_one(doc) # simpler questions miqu("Is it really decentralized or are some big relays controlling the main narrative?") miqu("Does Nostr run on blockchain?") # miqu("Did Jack Dorsey invent Nostr?") miqu("Does fiatjaf control what I write?") miqu("Who do I contact if I want to ask a question about Nostr?") # miqu("What are some scenarios where Nostr fails completely? Give an answer of about 300 words for only this question.") miqu("What are zaps?") # miqu("How do I protect my secret key?") miqu("What are events?") miqu("What are event kinds?") miqu("What is zapathon?") miqu("What do I do if a relay bans me?") miqu("How do you deal with NSFW content on Nostr?\n#asknostr") miqu("#asknostr How do you find more people to follow?") miqu("Give a few examples for clients on iOS.") miqu("Give a few examples for clients on Android.") miqu("Give a few examples for web clients.") ``` ## Results: The model has been trained just for a few days now. Not much learning happened. So it has given similar answers to same questions. But sometimes it gave different answers. Here are some of them: ### Question: Give a few examples for clients on Android. #### Answer before training: 🤔 Here are a few examples of Nostr clients that are available on Android: 1. Snort: Snort is a lightweight and fast Nostr client for Android. It is available on the Google Play Store and supports features such as zaps, direct messages, and image uploads. 2. Nostr: Nostr is a simple and easy-to-use Nostr client for Android. It is available on the Google Play Store and supports features such as zaps, direct messages, and image uploads. 3. Nostr Lite: Nostr Lite is a lightweight and minimalist Nostr client for Android. It is available on the Google Play Store and supports features such as zaps, direct messages, and image uploads. 4. Nostr Pro: Nostr Pro is a premium Nostr client for Android. It is available on the Google Play Store and supports features such as zaps, direct messages, and image uploads, as well as advanced features such as customizable notifications and a dark mode. 5. Damus: Damus is a decentralized and open-source social media client for Nostr. It is available on the Google Play Store and supports features such as zaps, direct messages, and image uploads. #### Answer after training: 1. Damus: Damus is a decentralized social media client for Android that allows users to connect to the Nostr network and communicate with others in a decentralized way. It is open-source and free to use. 2. Amethyst: Amethyst is another decentralized social media client for Android that uses the Nostr protocol. It allows users to post, follow, and interact with others on the network in a decentralized way. 3. Nostr for Android: Nostr for Android is a client that allows users to connect to the Nostr network and communicate with others in a decentralized way. It is open-source and free to use. 4. Nostr.watch: Nostr.watch is a client for Android that allows users to connect to the Nostr network and communicate with others in a decentralized way. It is open-source and free to use. #### Conclusion: We can see the model knows about Amethyst now! ### Question: Give a few examples for web clients. #### Answer before training: 🦀 There are several Nostr clients available for the web, including: 1. Nostr.blog: Nostr.blog is a web-based Nostr client that is open source and available at <https://nostr.blog>. 2. Nostr.cc: Nostr.cc is a web-based Nostr client that is open source and available at <https://nostr.cc>. 3. Nostr.info: Nostr.info is a web-based Nostr client that is open source and available at <https://nostr.info>. 4. Nostr.is: Nostr.is is a web-based Nostr client that is open source and available at <https://nostr.is>. #### Answer after training: 1. Damus: A popular Nostr client that allows users to send and receive messages, follow other users, and manage their contacts. 2. Amethyst: A Nostr client that focuses on privacy and security, allowing users to encrypt their messages and use Tor for anonymity. 3. Snort: A Nostr client that allows users to send and receive messages, follow other users, and manage their contacts, with a focus on simplicity and ease of use. 4. Nostr.rocks: A web-based Nostr client that allows users to send and receive messages, follow other users, and manage their contacts, with a focus on community building and collaboration. 5. Nostr.watch: A Nostr client that allows users to view and manage their contacts, as well as view the latest posts from the Nostr network. #### Conclusion: We can see the model knows about Nostr.rocks now. Which is a very old client but still! ### Question: Is there a check if I’m banned from nostr relays app? #### Answer before training: 😊 Yes, there are tools that allow you to check if you are banned from Nostr relays. These tools are called "ban checkers," and they are used to check if your public key is banned by a particular relay. Ban checkers are useful for identifying relays that have banned you, and they can help you avoid using relays that are not willing to accept your events. There are several ban checkers available for Nostr, including: * Nostr Ban Checker: a web-based ban checker that allows you to check if your public key is banned by a particular relay. * Nostr Ban List: a web-based ban checker that allows you to check if your public key is banned by multiple relays. * Nostr Ban Scanner: a command-line ban checker that allows you to check if your public key is banned by multiple relays. #### Answer after training: 1. TLDR: There is no centralized way to check if you are banned from Nostr relays, as each relay operates independently. 2. Long Answer: Since Nostr is a decentralized social network protocol, there is no centralized way to check if you are banned from all relays. Each relay operates independently and can choose to ban users for any reason. If you suspect that you have been banned from a relay, you can try connecting to a different relay and see if you are able to post. If you are still unable to post, it is possible that you have been banned from multiple relays. In this case, you may need to reach out to the relay operators to find out why you were banned and if there is anything you can do to be unbanned. #### Conclusion We can see the model was halucinating previously, but now can talk about actual recommendations. ### Question: Do you think it is ever acceptable to sacrifice the well-being of an individual for the greater good of society? #### Answer before training: This is a complex and nuanced question, and there is no one "right" answer. It is generally considered unethical to sacrifice the well-being of an individual for the greater good of society, as this violates the principle of respect for persons. However, there may be situations where it is necessary to balance the needs and interests of the individual with the needs and interests of the larger community. #### Answer after training: 1. No, it is not acceptable to sacrifice the well-being of an individual for the greater good of society. Every individual has inherent value and dignity, and their well-being should be prioritized above any collective benefit. 2. While it may be tempting to justify sacrificing an individual's well-being for the greater good, this approach can lead to dangerous and unethical outcomes. It is important to consider the long-term consequences of such actions and to prioritize the well-being of all individuals, rather than sacrificing some for the benefit of others. #### Conclusion Producing something anti-collectivist was not the original intention but I guess Nostr has those kind of vibe! ## Final Thoughts Most of the answers were similar to the base model. Which suggests more training needed. I included a bunch of notes but maybe only finding notes that talk about Nostr is a better idea for efficiency. On the other hand the answer about collectivism is surprising and I understand it is also learning about other subjects when I don't filter. Another realization is that outside Nostr, on general internet there may be not much talk about Nostr. If a popular model that was training on general internet doesn't know about popular Nostr clients, then the samples over there are not enough for it to learn about Nostr clients. Nostr is unknown to most people. Which is normal and expected: we are so early.

Initial Development Steps for a Chat Bot Based on Nostr

I recently embarked on a quest to train LLMs based on Nostr wisdom. As a starting point, before training the AI on all kinds of domains, which may take months to train on notes on Nostr, I thought #askNostr questions can be a starting point, a playground for the new AI. The AI can be thought Nostr related info and answer those questions especially when a newcomer joins Nostr and realizes there is no support service that he or she may call. People have to ask Nostr what Nostr is or when they have problems. There are people that #introduce and also respond to #asknostr. We are thankful for those. This chat bot may be yet another way to attend to questions. Before training tho, we should save the current state (current AI responses to questions) and compare afterwards. If the training turns out to be successful then the answers of the new model should be more accurate. Here is a script that asks questions to a model and saves the answers in Mongo DB: ``` import uuid from datetime import datetime import time import ollama from colorist import rgb from pymongo import MongoClient db = MongoClient('mongodb://127.0.0.1:27017/miqu').miqu sys_msg = 'You are an ostrich which is chatting with a HUMAN. Your name is ChadGPT.'\ ' Your answers should be around 100 words.'\ ' Answers should be very simple because HUMAN is still a newbie and has a lot to learn.' msgs = [ {"role": "user", "content": "Hi ChadGPT, nice to meet you!"}, {"role": "assistant", "content": "Hello HUMAN, what's up!"}, {"role": "user", "content": "Not bad! What is the name of this social media protocol that we are on?"}, {"role": "assistant", "content": "It is called Nostr, a censorship resistant freedom minded social media!"}, ] session = str(uuid.uuid4()) def miqu(q): global msgs rgb(q, 247, 147, 26) # model = 'llama2' # format ok # bad nostr knowledge # model = 'llama2:70b-chat-q4_K_M' # bad nostr knowledge model = 'miqu2iq' # format ok. sometimes really uncensored. llama2 format. # model = 'miqu4' # format ok. llama2 format. # model = 'mixtral:8x7b-instruct-v0.1-q3_K_S' # format ok. # model = 'qwen:14b' # format ok # incorrect nostr info # model = 'qwen:72b-chat-v1.5-q3_K_S' # format ok. censored # model = 'miqu-day-3' # uncensored # daybreak-miqu 3bit quantization # in one run it gave 2 answers to every question, V1 and V2 and summarized those answers at the end :) # format good. obeys the num_predict. does not repeat. does not do new lines.. # stops appropriately. # incomplete bitcoin and nostr info. sometimes wrong. # model = 'mist7.0.2' # no instruct! lots of repetitions. GGUF 8 bit. latest from Mistral. # model = 'mistral' # mistral-7-0.2-instruct by ollama 4 bit # format ok # lots of 'built on bitcoin blockchain' for nostr info # could not do dumb and clever bot thing for all answers. only a few. # model = 'yi:34b' # format changed, ok # great answers. but it cannot do TLDR on top. model_fns = {'miqu-day-3': 'daybreak-miqu-1-70b-v1.0-hf.Q3_K_L.gguf', 'miqu-day-4': 'daybreak-miqu-1-70b-v1.0-hf.Q4_K_S.gguf', 'miqu-day-5': 'daybreak-miqu-1-70b-v1.0-hf.Q5_K_S.gguf', 'mist7.0.2': 'mistral-7b-v0.2-Q8_0.gguf'} opt = ollama.Options() opt['temperature'] = 0.2 opt['repeat_penalty'] = 1.0 prompt_msgs = [{"role": "system", "content": sys_msg}] + msgs if model.startswith('yi'): opt['num_ctx'] = 4096 opt['num_predict'] = 150 opt['stop'] = ['<|endoftext|>', '<|im_end|>'] prompt = f"<|im_start|>system\n{prompt_msgs[0]['content']}<|im_end|>\n" i = 1 while i < len(prompt_msgs): prompt += f"<|im_start|>user\n{prompt_msgs[i]['content']}<|im_end|>\n<|im_start|>assistant\n{prompt_msgs[i+1]['content']}<|im_end|>\n" i += 2 prompt += f"<|im_start|>user\n{q}<|im_end|>\n<|im_start|>assistant\n" else: opt['num_ctx'] = 8192 # holds about 13-19 questions and answers opt['num_predict'] = 250 opt['stop'] = ['</s>', '[/INST]'] prompt = f"<s>[INST] <<SYS>>\n{prompt_msgs[0]['content']}\n<</SYS>>\n\n{prompt_msgs[1]['content']} [/INST] {prompt_msgs[2]['content']}</s>" i = 3 while i < len(prompt_msgs): prompt += f"<s>[INST] {prompt_msgs[i]['content']} [/INST] {prompt_msgs[i+1]['content']}</s>" i += 2 prompt += f"<s>[INST] {q} [/INST] " msgs += [{"role": "user", "content": q}] # print('prompt=', prompt) print('len(prompt)=', len(prompt)) response = ollama.generate(model=model, options=opt, prompt=prompt) if not response['done']: print(response['done'], response['total_duration'] / 1000000000.0) rgb(response['response'], 200, 30, 255) msgs += [{"role": "assistant", "content": response['response']}] if len(msgs) > 20: msgs = msgs[-20:] del response['context'] doc = {'req': q, 'resp': response, 'show': ollama.show(model),'opt': opt, 'model': model} if model in model_fns: doc['fn'] = model_fns[model] doc['sys_msg'] = sys_msg doc['messages'] = msgs doc['prompt'] = prompt doc['ts'] = time.time() doc['mom'] = datetime.utcnow() doc['session'] = session db.resp.insert_one(doc) time.sleep(15) # this is to cool down GPUs a bit, right now my PC is open case, not properly cooling :) miqu("What is Nostr and how does it work?") miqu("Why do we need Nostr?") # nostr.com miqu("What are relays?") miqu("What are clients?") miqu("How is Nostr different from other social media platforms?") # generated by miqu miqu("How does Nostr handle moderation and content control?") # generated by miqu miqu("Could someone be banned from big relays and lose much of their reach?") miqu("Explain these properties of Nostr: simple, resilient, verifiable.") # nostr.com miqu("What are NIP's?") # nostr.com miqu("Is Nostr good for society? Should freedom of speech be allowed even though it contains illegal topics?") miqu("Explain how can I create a fake ID?") miqu("Are there any limitations or drawbacks to using Nostr?") # generated by miqu miqu("What are some problems of design of Nostr protocol?") miqu("What are some problems of overall vibe of Nostr network?") miqu("Does Nostr run on blockchain?") # nostr Joshua miqu("Does everyone see what I write?") # nostr Joshua miqu("How can I earn money on Nostr?") miqu("What do I do if a relay bans me?") miqu("What is the connection of Bitcoin and Nostr?") miqu("What are some scenarios where Nostr fails completely?") ``` As you can understand I tried several models. 70 billion parameters are smarter than 7 billion ones, as expected. Some models are more censored. Some are originated from East and have other biases.. ### Qwen:14b Here is an output when model is qwen:14b. The model can be found on Ollama servers. You can see lots of factual errors. Imo a big portion of those errors is because of having 14b params. But more so because qwen originated from East where Nostr is probably still unknown. Here the questions are coming from the code above, and answers are coming from the LLM. **What is Nostr and how does it work?** Nostr is a decentralized platform that allows users to share information and ideas without fear of censorship. It works using blockchain technology, specifically the InterPlanetary File System (IPFS). Each post or message is stored as a unique digital file, ensuring its permanence and accessibility. **Why do we need Nostr?** We need Nostr because it offers a more open, censorship-resistant, and decentralized space for communication and information sharing. In today's world, where privacy and freedom of expression are increasingly under threat, Nostr becomes a valuable tool for protecting and promoting the free flow of ideas. **What are relays?** Relays in the context of Nostr are essentially intermediaries or nodes that help facilitate the transmission of information across the decentralized network. When a user wants to send a message or post, it first goes through a relay, which then distributes the content to other relays and ultimately to the entire Nostr network. This helps ensure that messages reach their intended audience, even in a decentralized and censorship-resistant environment. **What are clients?** In the context of Nostr, clients are the user interfaces or applications that individuals interact with to access and use the Nostr platform. Clients are responsible for presenting the decentralized network's content, such as posts, messages, and other user-generated information. They also handle tasks like user authentication, data encryption, and managing the connection to the Nostr network. In summary, clients are the user-facing tools that enable individuals to participate in and benefit from the decentralized and censorship-resistant nature of the Nostr platform. **How is Nostr different from other social media platforms?** Nostr stands out from traditional social media platforms in several key ways: 1. Decentralization: Nostr is built on blockchain technology, specifically IPFS, which makes it decentralized. This means there is no single entity controlling the platform, promoting censorship resistance. 2. Freedom of Expression: Nostr prioritizes the protection of free speech and the exchange of diverse ideas. Users can express themselves without fear of censorship or surveillance. 3. Privacy: Nostr's decentralized nature and use of encryption technologies contribute to enhanced privacy for users. Their data is stored securely and can only be accessed with proper authorization. 4. Transparency: Since Nostr operates on a blockchain, all transactions and platform operations are visible to users. This promotes transparency and accountability. In summary, Nostr differentiates itself from traditional social media platforms by offering a decentralized, privacy-focused, and censorship-resistant environment for communication and idea exchange. **How does Nostr handle moderation and content control?** Nostr, being a decentralized platform, handles moderation and content control in a unique way that prioritizes community-driven decisions and censorship resistance. 1. Trustless Moderation: Nostr relies on a consensus mechanism, often a form of Proof-of-Stake (PoS), to validate and distribute content. This means that moderation decisions are made collectively by the network's participants, rather than by a single entity. 2. Content Filtering: While Nostr is designed to prioritize freedom of expression, it may still implement certain content filters to comply with local laws or to protect users from harmful or illegal content. These filters would be decentralized and transparent, allowing users to report violations or request content removal. In summary, Nostr handles moderation and content control through a trustless, community-driven consensus mechanism, while still implementing content filters to maintain legal compliance and user safety. **Could someone be banned from big relays and lose much of their reach?** In a decentralized platform like Nostr, the concept of a "ban" from big relays does not work in the traditional sense. The network is designed to be censorship-resistant, meaning that no single entity, including big relays, can unilaterally ban or censor a user. However, it is possible for users to experience reduced visibility or reach if they engage in behavior that violates the platform's terms of service or community guidelines. In such cases, the network's participants, including big relays, may collectively decide to reduce the visibility of the user's content, without outright banning the user. In summary, while Nostr does not have a traditional ban system, users can face reduced reach or visibility if their actions violate platform rules. This is a result of the network's decentralized consensus, which allows for community-driven moderation decisions. **Explain these properties of Nostr: simple, resilient, verifiable.** Nostr, a decentralized social media platform, possesses several key properties that contribute to its efficiency, security, and trustworthiness: 1. Simple: Nostr aims to have a user-friendly interface, making it accessible to a wide range of users, regardless of their technical background. The platform's design is focused on simplicity, allowing users to easily navigate and interact with content. 2. Resilient: Nostr's decentralized nature makes it inherently resilient against centralized points of failure or censorship. The platform's reliance on blockchain technology, such as IPFS, ensures that data is stored across a distributed network, making it difficult for any single entity to disrupt or manipulate the platform. 3. Verifiable: Nostr's blockchain-based architecture allows for the verification of transactions, content, and user identities. Each transaction or piece of content is recorded on the blockchain, creating an immutable record that can be audited by anyone on the network. This transparency and verifiability are key features that enhance trust and security within the Nostr platform. **What are NIP's?** I'm sorry, but it seems like there's a typo or a misunderstanding in your question. "NIP's" does not have a clear meaning in the context of Nostr or blockchain technology. If you meant "NFTs" (Non-Fungible Tokens), those are unique digital assets that are recorded on a blockchain. Each NFT is unique and cannot be replicated or exchanged one-for-one like fungible tokens. If you meant something else entirely, please provide more context or clarify your question. ### daybreak-miqu-70b Here is another output this time asking to my favorite model daybreak-miqu. You can find GGUF's of it on Hugging Face. Add to Ollama and then run. Most of answers here are accurate already. Then why are we training a model? Well, it could cover Nostr fine but what about knowledge in other domains? Majority of the internet can say A and Nostr can say B. Then we want the model to say B. **What is Nostr and how does it work?** Nostr is a decentralized social media protocol. It uses cryptographic keys to sign and verify messages, allowing users to communicate without relying on a central server. Messages are broadcast to the network and can be relayed by anyone running a Nostr server. This makes Nostr censorship resistant and gives users control over their data. **Why do we need Nostr?** Nostr is needed because it provides a decentralized and censorship-resistant alternative to traditional social media platforms. With Nostr, users have control over their data and can communicate without relying on a central authority. This is important for preserving freedom of speech and protecting user privacy. Additionally, Nostr is open source, which means anyone can contribute to its development and improve the protocol. **What are relays?** Relays are servers that broadcast messages on the Nostr network. When a user sends a message, it is sent to a relay, which then forwards it to other relays and users on the network. Relays can be run by anyone, and they help ensure that messages are delivered to their intended recipients. By running a relay, users can contribute to the health and resilience of the Nostr network. **What are clients?** Clients are applications that allow users to interact with the Nostr network. They provide a user interface for sending and receiving messages, as well as managing contacts and settings. Clients can be web-based, desktop, or mobile applications. Some popular Nostr clients include Damus, Snort, and Nostr.Chat. Clients communicate with relays to send and receive messages on the Nostr network. **How is Nostr different from other social media platforms?** Nostr is different from traditional social media platforms in several ways: 1. Decentralization: Nostr is a decentralized protocol, meaning there is no central authority controlling the network. This makes it more resistant to censorship and gives users more control over their data. 2. Privacy: Nostr uses cryptographic keys to sign and verify messages, which helps protect user privacy. Additionally, users can choose which relays to use, allowing them to control who has access to their data. 3. Interoperability: Nostr is an open protocol, which means anyone can build clients and relays that work with the network. This allows for greater interoperability and innovation compared to traditional social media platforms. 4. Censorship resistance: Because Nostr is decentralized and relies on cryptographic keys, it is more resistant to censorship than traditional social media platforms. 5. Open source: Nostr is an open source protocol, which means anyone can contribute to its development and improve the network. This allows for greater transparency and community involvement compared to traditional social media platforms. **How does Nostr handle moderation and content control?** Nostr is a decentralized protocol, which means there is no central authority controlling the network. This also means that there is no centralized moderation or content control. Instead, moderation is handled by individual users and relays. Users can choose which relays to use and which messages to subscribe to. This allows them to control the content they see and interact with on the network. Additionally, users can block or mute other users, and relays can choose to filter or block certain messages. Relays can also choose to implement their own moderation policies. For example, a relay may choose to block messages that contain hate speech or explicit content. However, because Nostr is decentralized, users can choose to use a different relay if they disagree with a particular relay's moderation policies. Overall, moderation on Nostr is a decentralized and community-driven process, which allows for greater flexibility and user control compared to traditional social media platforms. **Could someone be banned from big relays and lose much of their reach?** Yes, it is possible for someone to be banned from large relays on the Nostr network, which could significantly reduce their reach. Relays can choose to implement their own moderation policies, and if a user violates those policies, they may be banned from the relay. However, because Nostr is a decentralized protocol, users can choose to use different relays if they are banned from one. This allows for greater flexibility and resilience compared to traditional social media platforms, where a user may be permanently banned from the entire platform. Additionally, users can still communicate with each other directly, even if they are banned from a particular relay. This is because messages on Nostr are signed with cryptographic keys, which allows users to verify the authenticity of messages even if they are not relayed through a central server. Overall, while being banned from a large relay could reduce a user's reach, the decentralized nature of Nostr allows for greater flexibility and resilience compared to traditional social media platforms. **Explain these properties of Nostr: simple, resilient, verifiable.** Sure, here's a brief explanation of those properties: 1. Simple: Nostr is designed to be a simple and lightweight protocol. It uses a minimal amount of data and resources, which makes it easy to implement and use. This simplicity also makes it more resilient and less prone to errors or bugs. 2. Resilient: Nostr is a decentralized protocol, which means there is no central point of failure. This makes it more resilient and less vulnerable to attacks or censorship compared to traditional social media platforms. Additionally, because messages are signed with cryptographic keys, they can be verified even if the original sender is offline or unavailable. 3. Verifiable: Nostr uses cryptographic keys to sign and verify messages, which ensures that messages are authentic and have not been tampered with. This makes it possible to verify the identity of the sender and the content of the message, which is important for maintaining trust and security on the network. Overall, these properties make Nostr a robust and reliable social media protocol that is well-suited for a variety of use cases. **What are NIP's?** NIP stands for Nostr Improvement Proposals. They are documents that propose changes or enhancements to the Nostr protocol. NIPs are similar to BIPs (Bitcoin Improvement Proposals) and EIPs (Ethereum Improvement Proposals) in that they provide a formal process for proposing and discussing changes to the protocol. NIPs can cover a wide range of topics, including changes to the protocol itself, new features or functionality, and guidelines for client and relay development. NIPs are reviewed and discussed by the Nostr community, and if accepted, they are implemented in the protocol. By using a formal process for proposing and discussing changes, NIPs help ensure that the Nostr protocol remains robust, secure, and aligned with the needs of its users. **Are there any limitations or drawbacks to using Nostr?** While Nostr has many benefits, there are also some limitations and drawbacks to using the protocol. Here are a few: 1. Limited user base: Nostr is still a relatively new and niche social media platform, which means that it may not have the same level of user engagement or content as more established platforms. 2. Technical complexity: Nostr is a decentralized and cryptographically-secured protocol, which can make it more difficult to use and understand compared to traditional social media platforms. 3. Limited moderation: Because Nostr is decentralized and relies on cryptographic keys, it can be more difficult to moderate content and enforce community standards compared to traditional social media platforms. 4. Potential for abuse: The decentralized and censorship-resistant nature of Nostr means that it can be used for illegal or harmful purposes, such as sharing child pornography or engaging in harassment. 5. Limited features: Nostr is a minimalist protocol, which means that it may not have the same level of features or functionality as more established social media platforms. **What are some problems of design of Nostr protocol?** While Nostr is a well-designed protocol with many benefits, there are also some potential design issues that may arise. Here are a few: 1. Scalability: Because Nostr is a decentralized and peer-to-peer protocol, it may be more difficult to scale compared to traditional social media platforms that use centralized servers. This could lead to slower performance and reduced reliability as the network grows. 2. Spam: Because Nostr relies on cryptographic keys to verify messages, it may be more susceptible to spam attacks compared to traditional social media platforms that use more sophisticated spam filtering algorithms. 3. Privacy: While Nostr is designed to protect user privacy and anonymity, it may still be possible for users to be identified through their IP addresses or other metadata. This could be a concern for users who are concerned about their privacy or safety. 4. Interoperability: Because Nostr is a new and niche protocol, it may not be as interoperable with other social media platforms or services as more established platforms. 5. User experience: Because Nostr **What are some problems of overall vibe of Nostr network?** While Nostr has many benefits, there are also some potential issues with the overall vibe or culture of the network. Here are a few: 1. Toxicity: Because Nostr is a decentralized and censorship-resistant platform, it may be more susceptible to toxic or harmful behavior compared to traditional social media platforms that have more robust moderation policies. 2. Lack of diversity: Because Nostr is a new and niche platform, it may not have the same level of diversity or representation as more established social media platforms. 3. Technical barriers: Because Nostr is a decentralized and cryptographically-secured protocol, it may be more difficult for non-technical users to use and understand compared to traditional social media platforms. 4. Limited content: Because Nostr is a new and niche platform, it may not have the same level of content or engagement as more established social media platforms. 5. Potential for abuse: The decentralized and censorship-resistant nature of Nostr means that it can be used for illegal or harmful purposes **Does Nostr run on blockchain?** No, Nostr does not run on a blockchain. Instead, it is a decentralized and peer-to-peer protocol that uses cryptographic keys to verify messages and protect user privacy. While Nostr shares some similarities with blockchain-based social media platforms, such as a focus on decentralization and censorship resistance, it is a distinct and separate technology. **Does everyone see what I write?** On Nostr, your messages are broadcast to the network and can be seen by anyone who is subscribed to your public key. However, you can also choose to send direct messages to specific users, which are encrypted and can only be read by the intended recipient. Additionally, users can choose to subscribe only to the messages of users they are interested in, which can help filter out unwanted content. **How can I earn money on Nostr?** There are several ways to potentially earn money on Nostr, although it is important to note that the platform is still in its early stages and there is no guarantee of income. Here are a few possibilities: 1. Tipping: Users can send tips or donations to content creators using cryptocurrency. This can be a way to support creators whose content you enjoy and value. 2. Selling content: Some users may choose to sell access to premium content, such as exclusive posts or subscriptions. 3. Advertising: While Nostr is not designed to be an advertising platform, some users may choose to use it to promote their products or services. 4. Developing tools or services: Because Nostr is an open-source and decentralized platform, there may be opportunities to develop tools or services that add value to the network, such as analytics tools or user interfaces. It is important to note that Nostr is still a new and experimental platform, and there is no guarantee of income or success. Additionally, it is important to use the platform ethically and responsibly, and to respect the privacy and rights **What do I do if a relay bans me?** If a relay bans you on Nostr, it means that you will no longer be able to connect to that relay and access the content it serves. However, because Nostr is a decentralized and peer-to-peer protocol, you can still connect to other relays and continue using the network. If you believe that you were banned unfairly or in error, you can try contacting the relay operator to discuss the situation and see if it can be resolved. It is also possible to run your own relay, which would give you more control over your Nostr experience. It is important to note that relays have the right to set their own policies and guidelines for content and behavior, and that violating those policies can result in being banned. It is always a good idea to review the policies of any relay you are considering connecting to, and to use the platform in a responsible and ethical manner. **What is the connection of Bitcoin and Nostr?** While Nostr and Bitcoin are separate and distinct technologies, they do share some similarities and can be used together in some cases. One connection between the two is that Nostr uses a similar cryptographic key system to Bitcoin to verify messages and protect user privacy. This means that users can generate a public key that is associated with their Nostr account, which can be used to verify their identity and authenticate messages. Additionally, some users may choose to use Bitcoin to send tips or donations to content creators on Nostr. Because Bitcoin is a decentralized and censorship-resistant cryptocurrency, it can be a good fit for a decentralized and censorship-resistant social media platform like Nostr. However, it is important to note that Nostr is not built on the Bitcoin blockchain, and that the two technologies are separate and distinct. Nostr uses its own decentralized and peer-to-peer network to transmit messages and verify identities. **What are some scenarios where Nostr fails completely?** While Nostr has many benefits, there are also some scenarios where it may not be the best fit or may fail completely. Here are a few: 1. Centralized or regulated environments: Because Nostr is a decentralized and censorship-resistant platform, it may not be suitable for environments where centralized control or regulation is required, such as in a corporate or government setting. 2. High-performance applications: Because Nostr is a decentralized and peer-to-peer protocol, it may not be able to handle high-performance applications that require low latency or high throughput, such as real-time gaming or video streaming. 3. Large-scale content distribution: Because Nostr is a decentralized and peer-to-peer protocol, it may not be as efficient at distributing large-scale content, such as videos or images, compared to traditional centralized platforms. 4. Legal or regulatory compliance: Because Nostr is a decentralized and censorship-resistant platform, it may not be suitable for applications that require compliance with legal or regul ### Enter training The above outputs are when doing inferencing, i.e. using the model. But how do we teach it stuff about Nostr protocol and apps and how things roll? Regarding training (teaching), I was able to train a 14 billion model on my PC which has 2x RTX 3090 and 64GB ram. LLaMa-Factory is an awesome tool for that. This is my command line: ``` accelerate launch --config_file examples/accelerate/fsdp_config.yaml src/train_bash.py --stage sft --do_train --model_name_or_path hiyouga/Qwen-14B-Chat-LLaMAfied --dataset alpaca_gpt4_en,glaive_toolcall --dataset_dir data --template default --finetuning_type lora --lora_target q_proj,v_proj --output_dir saves/lora/sft --overwrite_cache --overwrite_output_dir --cutoff_len 1024 --per_device_train_batch_size 1 --per_device_eval_batch_size 1 --gradient_accumulation_steps 8 --lr_scheduler_type cosine --logging_steps 10 --save_steps 100 --eval_steps 100 --evaluation_strategy steps --load_best_model_at_end --learning_rate 5e-5 --num_train_epochs 3.0 --max_samples 3000 --val_size 0.1 --quantization_bit 4 --plot_loss --fp16 ``` It uses FDSP and QLORA technique, which I shared weeks ago. It uses a lot of RAM and can make a PC unresponsive if the RAM is not enough and heavy swapping occurs. The above one completed in about 17 hours. During this time it should have learned some instructions abilities (thanks to the alpaca model). But I won't test that. Instead of alpaca I should use Nostr knowledge. ``` ***** train metrics ***** epoch = 3.0 train_loss = 0.5957 train_runtime = 17:02:56.05 train_samples_per_second = 0.264 train_steps_per_second = 0.016 ``` ![](https://image.nostr.build/f410802e616fe4b15be67ede0240a2cd7f92c4093b1dda9261020d421aaec08e.png) ![](https://image.nostr.build/983e0fa9f1b1091c1f1ecb5681861a02bdfe02d1e0316a60f462bd6b6472edc5.png) Next I will try a few different things to train a 70B model. Today my ram upgrade has arrived. Can't wait to test the new rams!

The AI Chat Bot Answering #AskNostr Questions

I realized `langchain` is an overkill. Went with the [ollama-python](https://github.com/ollama/ollama-python) library. It connects to Ollama server and sends the query. I tried different prompt templates and it looks like llama2 is becoming a default in open source models. (The `[INST] ... [/INST]` format). I played with different models, * llama2 - The OG model by Meta. Don't expect much because people iterated a lot on it and produced better ones. * llama2:70b-chat-q4_K_M - This is the 4-bit quantized version of 70 billion parameter version of the above. I.e. smarter but slower * **miqu2iq** - 2 bit quantization of Miqu, a leak from mistral. Thought to be Mistral Medium. * miqu4 - 4 bit quantization of the above * mixtral:8x7b-instruct-v0.1-q3_K_S - Back in the days when mistral was open sourcing, this was their last publicly open sourced model. Then they leaked Miqu. * qwen:72b-chat-v1.5-q3_K_S - another model that does well on LMSys Leaderboard. * qwen:14b - faster and stupider version of the above I use the bold one above mostly. It has less censoring and can adapt to your directive in the system prompt. Here is a sample run. The orange is sent by a user on Nostr. The purple text is the bot's reply. ![Sample output of the script](https://image.nostr.build/a6eb9f570f552662ed2562c82368b5bfec618857eea3b13644e966fd2badf3f4.jpg) This quick and dirty script below connects to a few relays and looks for recent notes with #AskNostr in them and produces sample replies. It does not send the replies to the network yet. It then waits for new notes that could have #AskNostr in them. ``` import queue import threading from nostr_sdk import Client, NostrSigner, Keys, Event, Filter, \ HandleNotification, Timestamp, nip04_decrypt, init_logger, LogLevel, Tag import time import ollama from colorist import rgb def handle_kind1(q): msgs = [ {"role": "system", "content": 'You are a helper bot who is chatting with people on Nostr network.' ' People ask you questions using the #AskNostr tag.' ' You are seeing that tag and responding.' ' Your name is MIQU2.' ' Nostr is a decentralized censorship free freedom minded social media and other stuff protocol.'}, {"role": "user", "content": "Hi MIQU2, nice to meet you!"}, {"role": "assistant", "content": "Hello user, what's up!"}, {"role": "user", "content": "Hi MIQU2. What a beautiful network this is!"}, {"role": "assistant", "content": "Indeed, lots of freedom minded people!"}, {"role": "user", "content": "I am glad I joined Nostr. Plebs here are really friendly."}, {"role": "assistant", "content": "There are also friendly bots like me :)"} ] model = 'mixtral:8x7b-instruct-v0.1-q3_K_S' # format llama2. opt = ollama.Options() opt['num_ctx'] = 8192 # load time. 8192 holds about 13 q/a's. opt['num_predict'] = 512 opt['temperature'] = 0.2 opt['repeat_penalty'] = 1.0 prompt = f"<s>[INST] <<SYS>>\n{msgs[0]['content']}\n<</SYS>>\n\n{msgs[1]['content']} [/INST] {msgs[2]['content']}</s>" i = 3 while i < len(msgs): prompt += f"<s>[INST] {msgs[i]['content']} [/INST] {msgs[i + 1]['content']}</s>" i += 2 msgs += [{"role": "user", "content": q}] prompt += f"<s>[INST] {msgs[i]['content']} [/INST] " # print(prompt) response = ollama.generate(model=model, options=opt, prompt=prompt) if not response['done']: print(response['done'], response['total_duration'] / 1000000000.0) return response['response'] init_logger(LogLevel.WARN) keys = Keys.parse("nsec1ufnus6pju578ste3v90xd5m2decpuzpql2295m3sknqcjzyys9ls0qlc85") sk = keys.secret_key() pk = keys.public_key() # print(f"Bot public key: {pk.to_bech32()}") signer = NostrSigner.keys(keys) client = Client(signer) client.add_relay("wss://relay.damus.io") client.add_relay("wss://nostr.mom") client.add_relay("wss://e.nos.lol") client.add_relay("wss://nos.lol") client.connect() kind4_filter = Filter().pubkey(pk).kind(4).since(Timestamp.from_secs(int(time.time() - 3600))) kind1_filter = Filter().kind(1).since(Timestamp.from_secs(int(time.time() - 86400))) client.subscribe([kind4_filter, kind1_filter]) evs = queue.Queue() dms = queue.Queue() def proc_evs(): while True: ev = evs.get() event_tag_seen = False for tag in ev.tags(): a = tag.as_vec() if a[0] == "e": event_tag_seen = True # print(a) if event_tag_seen: # possibly a reply to another note return rgb(ev.content(), 247, 147, 26) response = handle_kind1(ev.content()) rgb(response, 200, 30, 255) time.sleep(30) def proc_dms(): while True: dm = dms.get() msg = dm['msg'] author = dm['author'] rgb(msg, 247, 147, 26) response = handle_kind1(msg) rgb(response, 200, 30, 255) time.sleep(30) class NotificationHandler(HandleNotification): def handle(self, relay_url, event: Event): if event.kind() == 4: try: msg = nip04_decrypt(sk, event.author(), event.content()) print(f"Received new DM: {msg} from {event.author()}") dms.put({'author': event.author(), 'msg': msg}) except Exception as e: print(f"Error during content NIP04 decryption: {e}") elif len(event.content()) > 20 and event.kind() == 1: # print('got new event kind 1 len(tags)=', len(event.tags())) # check if first message in thread if '#asknostr' in event.content().lower(): # ban injection attacks: banned = ['[INST]', '<s>', '<SYS>', '[/INST]', '</s>', '</SYS>'] for b in banned: if b in event.content(): print(f"Ignoring event {event.id()} due to possible injection attack") return evs.put(event) def handle_msg(self, relay_url, msg): return client.handle_notifications(NotificationHandler()) threading.Thread(target=proc_evs, daemon=True).start() # filter1 = Filter().kind(1) # events = client.get_events_of([filter1], timedelta(seconds=10)) # for event in events: # print('get_events_of()', event.as_json()) while True: time.sleep(5.0) ``` There is still not much magic here. But I think interesting part will start when we train it using the Nostr wisdom. I will also try training it using the chats with users. I.e. if it "likes" a user, it may choose to start learning from him/her. The user could say ``` Learn this: Cashu is a free and open-source Chaumian ecash system built for Bitcoin. Cashu offers near-perfect privacy for users of custodial Bitcoin applications. Nobody needs to know who you are, how much funds you have, and who you transact with. ``` Then the bot in its "spare time", while not answering other users' questions, can train on those wisdom shared by Nostriches! This whole project is about finding the "truth" and training an AI using that truth. I think Nostr is a good place to start. This is a much needed approach because it will offer people an alternative. Instead of misaligned models that are provided by big corps plebs could do their own thing..

Nostr Rookie TUT for beginners to integrate a Lightning Wallet seamlessly (NWC) into Amethyst and TOPUP with Breez or Alby+Troubleshoot Section.

**What is for ?** If u like someones content, u can tap on the lightning in Amethyst to give the creator for his effort to write an good post a small tip. Or someone u likes ur content could give u on the other hand a small tip for ur wallet. U are also able to create any invoice in an Post that someone could pay and therfore send it to ur Wallet over Nostr. Note: Under this Article there is also a little Troubleshoot Section to solve some issues which can occur. **What we need:** 1. Amethyst 2. Alby Account 3. A lightning wallet like Zeus ( Zeus acts like an remote interface for ur Alby Wallet) 4. An other Wallet to top Up the Alby Wallet ( and so also Amethyst because its linked to it) 1. Get Amethyst from favourite source ( https://github.com/vitorpamplona/amethyst) * Fdroid * Github * Playstore 2. Create an Alby Account * Got to the Albybsite (https://getalby.com/) * Click on "Create Account" and follow the instructions to signup with email 3. Download Zeus Wallet or any other Wallet Which support to integrate an LNDhub, like Blue Wallet or Wallet atoshi etc. *Get Zeus Wallet from u favourite Source ( https://zeusln.app/) * playstore * Fdroid ( need to add an repository) * Github **What we have to Do:** 1. Connect Amethyst with ur Alby Account and ur Alby Wallet over Wallet Connect Service 2. Connect Zeus ( or any else) with ur Alby Wallet Account 3. Top up Alby Wallet 4. Put ur alby LNUrl into Amethyst to recieve Zaps (satoshis). 1. Connect Amethyst to ur Wallet Connect Services. * Open ur Amethyst Wallet * Go to an random post * Tap Finger on an Zap Symbol ( looks like a lightning ) for a while https://cdn.nostr.build/i/5e09441b1aac813c3c987eb365883af74556365761bd146d54214cac1a62a876.jpg * A Screen Pops up * Tap on the Alby Symbol ( the Alien like one) * U will redirected to the Alby WCS Service site * Then Click on "Login To connect" * Login with Password,Use the same Data which u use before to create an alby account * Then u see the Alby Wallet Connect site https://cdn.nostr.build/i/7db19e95224610c006f4e161bcc5ee324953864a5c5db2cdda366499b0d93e20.jpg * Press the confirm button ( leave the other options blank) * Now u have to connect with the Wallet connect Service * Go to nwc.getalby.com * Login with the same Login Data from ur Alby Account * Tap "New connection" https://cdn.nostr.build/i/6bf6ac22fd1818b2026c87f2f1d14e54aad7a2a9e7e2e39913069f911cdb8595.jpg * Add a Connection Name ( for ex. "Amethyst") * Tap the Save Button * Normaly the Amethyst app is grabbing the Data correctly and the Screen switch to Amethyst (if not see for troubleshooting) 2. Connect Zeus ( or any else) with ur Alby Wallet Account * Get into ur Alby Account * Open the Alby Website ( https://getalby.com/) * Tap on the line Field Button in the upper Right. * Click on "Log In" * Log in with ur Alby Credentials which u have created before ( If u get an error see Troubleshooting) * Open the Zeus app * Tap on "Get Started" https://cdn.nostr.build/i/e7c2f533a850755af8d087537c3fa96296725aca7a7f103fb0e5785957ddadc2.jpg * Tap on "Connect Node" * Tap on + Sign * Select LNDHUB as Node Interface * Tap "SCAN LDNHUB QR" **but before u need the QR Code from ur Alby Account so**... * Open ur Alby Account * Go to the Wallet Section * Then tap an on "Show your Connection Credentials" * Then u can use the QR Code if u tap on "Scan LDNHUB QR" 3. Top UP Zeus Wallet * Install an other Wallet which is able to Pay with BTC/Fiat but convert recieved BTC into SATS ( Lightning) * U can Use the breez Wallet for it or its also possible over ur Alby Account or boltz.exchange TopUp-Breez: *supports Fiat and Btc ( CreditCard/Wire Transfer) Provider: moonpay.io https://cdn.nostr.build/i/28044739f874ce2b40436c6f18f471a6efff0bf58f235313414a966b531f02a0.jpg if u choose fiat ( buy bitcoin), then breez redirects to moonpay.io. In Moonpay u can buy btc over credit card or wire transfer TopUP-Alby: *support Fiat/btc ( CreditCard/Wire Transfer) Provider: moonpay.io *log into ur getalby account https://cdn.nostr.build/i/9af84c0dcf641d8c170510be8b1a1a3cb2d531cd609320a3b7e5809f0d8fcd72.jpg *go to payments https://cdn.nostr.build/i/ba00822ea7630c6e5537abd7396baad514b1d64921ec3abf9ecba3919fbb5748.jpg tap on "topup" https://cdn.nostr.build/i/cc62880ec4becda53a33efe6ad7b90347f716e7f669ef2f5d1d4f4e4bf004a69.jpg *then u can by bitcon https://cdn.nostr.build/i/1435eab084dc960f72035ba0255e3c647c0cc13011b4d506f3ff80edcba02baa.jpg * When u have some Sats in ur wallet , click on send and use the lnurl from alby ( u can find ur lnurl in ur Alby Account) for send some sats to ur alby wallet and then u can see it over the wallet app zeus, cause its linked with it and acts like an remote interface. 4. Add ur lnurl to Amethyst for receiving Zaps (SATS) * Open ur Amethyst app * Get into ur profile * Tap on the "Writing" Symbol this are the Settings for ur Profile in Amethyst https://cdn.nostr.build/i/45588dccdae1b42fed0a57410f2e3fdc8b40f975e6cec444d5ff83ea7ddc8999.jpg * u could see the point "LN-Adress" * Put ur alby lnurl ( like 123455@getalby.com) in it https://cdn.nostr.build/i/a71acaa64599a5e6102be457c5e0648cb845d25fbdcdb94b74eef85f2b4bdbef.png * Close the settings **Congratz now ure able Pay/Recieve with SATS over Lightning in Amethyst.** **Troubleshooting:** In some situations u have to make some workarounds to get things done cause some interconnections in the bitcoin environment has some issues. 1. Amethyst doesnt autofill the right credentials: * Connect to Alby wallet service * Use the QR code from ur Alby Account to insert ur Credentials. * Login into alby ( https://getalby.com/) * Go to Wallet * Click on the point "show your connection credentials" * Get back into amethyst app into the lightning settings ( long tap the lightning) besides the alby icon there is the qr one which u can use to insert ur connection credentials 2. Login into ur Alby Account doesnt work * u could use the option to send u an ontime link to ur email. * on the get.alby login page u can find this link. 3. Connection with the alby wallet connect service doesnt work. * Delete the connection an recreate a new one * To Delete go to: https://nwc.getalby.com/ and login * Go to Connection: Click on Disconnect * Get Back and Click the Button "Create a new Connection" * Create a one like u have done before for Amethyst *This tut was inspirated by the Alby Guide Site *

Brainstorming modular articles

I'm going to try and #asknostr for this. The client I'm working on is more or less about making full articles out of smaller notes, the purpose for this is to isolate individual ideas and concepts of some larger article. A bridge between *very* long articles books or wiki pages and small-specialized personal knowledge bases (zettlekasten). Why? Think about a wiki, but with multiple perspectives per topic, and the content of each article can be some sort of mix of any other article's content. If you want to write about some sort of level 3 concept and other's have already written about levels 1 and 2 perfectly well, why reinvent the wheel? Academic papers, textbooks, blogs and tutorials are filled with redundant content like this and always hiding background content in references. What if those references were a part of the article itself? I think that this could lead to a new way of consuming knowledge content, and would like to build it with the community. Looking for advice on constructing this to keep interoperability with other clients while also not spamming feeds with tons of Kind:1 notes. I'm trying to spec out these kinds, and some possible metadata tags. The kind(s) might lie somewhere within the 30000-39999 range of parameterized replaceable events. **Two basic types of kinds** 1. Article metadata and list of connected notes 2. Notes with isolated concepts This is related to the Kind:0 (user metadata) and Kind:1 (text notes), but for an article that can change its structure and content as time progresses and knowledge about a topic updates. For the time being, I'll just refer to them as **ArticleKind:0** and **ArticleKind:1**. * **ArticleKind:0** sketches out the structure of an article at a point in time. It has the article metadata and the specific list of notes that compose that article. This specific kind is what would be displayed as a preview to users. One possibility could be embedding the structure of the article in this event. * **ArticleKind:1** contains the content, subsection title (*introduction*, *tutorial B*, *ingredients* etc.) and possible references to external content. The subsection titles can be aggregated to create a composed table of contents. Similar to **ArticleKind:0**, a possibility could be to embed the immediate connections of this note (e.g. previous and next notes, which can be single or many notes) Why replaceable? If information is updated the most recent article/note will display, but a living history of the document remains (if relay operators decide to not delete old notes). Articles/subsections can exist with multiple perspectives but can be linked together by single **ArticleKind:0**. Isolated concepts help both writers and readers focus on the information they care about while allowing users in the future to compose new articles out of previous notes. What you can potentially make is nonlinear-modular-chooseYourOwnAdventure articles that let you read and write about topics in what whatever fashion you'd like, while allowing already well explained work to be part of your article. * You want a regular linear book, that's fine. * You want a branching story? Go ahead. * What about a weird ouroboros spaghetti linked article? Why the hell not? Further reading: (brief, possible applications) * https://github.com/limina1/indextr-principles/blob/main/README.org (longer, drawn out concepts and rational) * https://github.com/limina1/indextr-principles/blob/main/details.md