Run a Simulation before placing your next Polymarket bet - Сode included.
The Monte Carlo method is hyped across Polymarket Quants right now.
But only a few knows how to apply it correctly to different situations on PM to run a simulation based on it.
Run these 4 simulations before placing your next bet:
> Sequential Monte Carlo simulation
Used for dynamic simulation when a market has several parameters, and each of them can affect the result
• Logit random walk formula:
logit(xₜ) = logit(xₜ₋₁) + εₜ, where εₜ ~ N(0, σ²_process)
//
> Tail events simulation
Tail events - events with very low probability, and they’re hard to simulate reliably.
However, you can’t ignore them.
• Formula for estimating a tail event probability:
p̂_IS = (1/N) Σ_{i=1..N} 1{X_i ∈ A} · w(X_i), with X_i ~ Q
//
> Correlated markets outcomes simulation:
Tail dependence: markets co-move much more in extremes than correlation implies.
• Upper tail dependence formula:
λ_U = limit as u → 1⁻ of P(Y > FY⁻¹(u) | X > FX⁻¹(u))
• Lower tail dependence formula:
λ_L = limit as u → 0⁺ of P(Y ≤ FY⁻¹(u) | X ≤ FX⁻¹(u))
//
> Agent-Based simulation
Prediction markets have different agents: informed traders, noise traders, market makers, and bots.
Despite irrational traders, prices still tend to converge to fair value over time.
Run an agent-based simulation to filter out agent-driven noise.
Read the full article to learn how to run your first prediction-market simulation in a few simple steps.
Brad Matthews retweeted
Free alpha for semiconductor people, this is one of the grad textbooks we use (free to download, 2024): plummergriffinbook.stanford.…
Brad Matthews retweeted
A Self-Reflecting LLM Agent
Equips LLM-based agent w/
-dynamic memory
-a self-reflective LLM
-a method for detecting hallucinations
Challenge agent to learn from its own mistakes
-Evaluate on knowledge-intensive tasks
-Outperforms ReAct agents
Paper: arxiv.org/abs/2303.11366
Brad Matthews retweeted
A caulk nozzle for satisfying silicone sealing
teapaw.org/i/status/1761371818865…
Brad Matthews retweeted
=>
Origins of GPU Computing, D. Kirk, SC19 teapaw.org/ogawa_tter/status/1205…
Merrimac, Thnx @tdih_hpc
WhP, Sep 2001 web.archive.org/web/20040226…
SC03 dl.acm.org/doi/10.1145/10489…
web.archive.org/web/20050123…
Bill Dally
Nov 2023 teapaw.org/ogawa_tter/status/1724…
Nov 2022
teapaw.org/ogawa_tter/status/1720…
Symphony, 3D DRAM
Replying to @ogawa_tter
=>
B. Dally, Nov 2022
Symphony, Hybrid Programmable/Specialized Arch, ACM TCS, Oct 27 2023 teapaw.org/ogawa_tter/status/1720…
Configurable Pipelines of Logical Elements
Symphonic CUDA
7nm: 31× & 44× in Performance & Energy over A100
Appls teapaw.org/ogawa_tter/status/1715…
Configurable Memory Mapper
Brad Matthews retweeted
New: OpenAI Approached Anthropic About Merger by @steph_palazzolo
theinformation.com/articles/…
Brad Matthews retweeted
Stunningly poor governance and surprised $MSFT didn't insist on stronger representation. The seeds of this governance malfunction however can be found in the word salad which describes how the Open AI for profit entity is controlled by the eleemosynarians. openai.com/our-structure
OpenAI investors (like @Microsoft) need to step up and demand that the governance weaknesses at @OpenAI be fixed. Yes, they should do right by @sama. But, regardless, decisions around leadership & direction in a technology as important as fire and electricity can't be decided by 2-4 people on a bad day.
Brad Matthews retweeted
Altman Sought Billions For AI Chip Venture Before OpenAI Ouster via @business bloomberg.com/news/articles/…
Brad Matthews retweeted
The most underrated LLM Cookbook! 🙏
@OpenAI’s guide is an incredibly underrated resource
My favourite bit is the practical advice and guides sprinkled throughout the examples
It also has the highest quality code of many learning resources
The examples cover all important building blocks of Large Language Model systems.
Definitely worth multiple epochs of learning:
github.com/openai/openai-coo…
Brad Matthews retweeted
What is a 𝗩𝗲𝗰𝘁𝗼𝗿 𝗗𝗮𝘁𝗮𝗯𝗮𝘀𝗲?
With the rise of Foundational Models, Vector Databases skyrocketed in popularity. The truth is that a Vector Database is also useful outside of a Large Language Model context.
When it comes to Machine Learning, we often deal with Vector Embeddings. Vector Databases were created to perform specifically well when working with them:
➡️ Storing.
➡️ Updating.
➡️ Retrieving.
When we talk about retrieval, we refer to retrieving set of vectors that are most similar to a query in a form of a vector that is embedded in the same Latent space. This retrieval procedure is called Approximate Nearest Neighbour (ANN) search.
A query here could be in a form of an object like an image for which we would like to find similar images. Or it could be a question for which we want to retrieve relevant context that could later be transformed into an answer via a LLM.
Let’s look into how one would interact with a Vector Database:
𝗪𝗿𝗶𝘁𝗶𝗻𝗴/𝗨𝗽𝗱𝗮𝘁𝗶𝗻𝗴 𝗗𝗮𝘁𝗮.
1. Choose a ML model to be used to generate Vector Embeddings.
2. Embed any type of information: text, images, audio, tabular. Choice of ML model used for embedding will depend on the type of data.
3. Get a Vector representation of your data by running it through the Embedding Model.
4. Store additional metadata together with the Vector Embedding. This data would later be used to pre-filter or post-filter ANN search results.
5. Vector DB indexes Vector Embedding and metadata separately. There are multiple methods that can be used for creating vector indexes, some of them: Random Projection, Product Quantization, Locality-sensitive Hashing.
6. Vector data is stored together with indexes for Vector Embeddings and metadata connected to the Embedded objects.
𝗥𝗲𝗮𝗱𝗶𝗻𝗴 𝗗𝗮𝘁𝗮.
7. A query to be executed against a Vector Database will usually consist of two parts:
➡️ Data that will be used for ANN search. e.g. an image for which you want to find similar ones.
➡️ Metadata query to exclude Vectors that hold specific qualities known beforehand. E.g. given that you are looking for similar images of apartments - exclude apartments in a specific location.
8. You execute Metadata Query against the metadata index. It could be done before or after the ANN search procedure.
9. You embed the data into the Latent space with the same model that was used for writing the data to the Vector DB.
10. ANN search procedure is applied and a set of Vector embeddings are retrieved. Popular similarity measures for ANN search include: Cosine Similarity, Euclidean Distance, Dot Product.
Some popular Vector Databases: Pinecone, Weviate, Milvus, Vespa.
--------
Follow me to upskill in #MLOps, #MachineLearning, #DataEngineering, #DataScience and overall #Data space.
Also hit 🔔to stay notified about new content.
𝗗𝗼𝗻’𝘁 𝗳𝗼𝗿𝗴𝗲𝘁 𝘁𝗼 𝗹𝗶𝗸𝗲 💙, 𝘀𝗵𝗮𝗿𝗲 𝗮𝗻𝗱 𝗰𝗼𝗺𝗺𝗲𝗻𝘁!
Join a growing community of Data Professionals by subscribing to my 𝗡𝗲𝘄𝘀𝗹𝗲𝘁𝘁𝗲𝗿: newsletter.swirlai.com
No answer for AD.
Brad Matthews retweeted
Excited to present Pix2Struct! It's a general-purpose pixel-to-text model that can be finetuned on tasks with visually-situated language, such as UIs, charts, figures, tables, documents, etc. -- arxiv.org/abs/2210.03347 (1/4)
Brad Matthews retweeted
The analogy between GPTs of today to the CPUs of early days of computing are interesting. GPT is a funny kind of programmable text computer. Have to think through it more 🤔 but e.g.:
## Memory
GPT-4 RAM is ~log2(50K vocab size)*(32K context length)/(8 bits/byte) ~= 64kB, roughly a Commodore64. Just as then, optimizing this precious resource is critical.
GPT registers are the residual stream. There are d_model of them, e.g. GPT-3 has ~12K registers. VLIW architecture vibes.
## CPU
The LOAD instruction is the Attention mechanism, except it can address by both location and/or content.
The STORE instruction is forced every n_layer number of clock cycles.
The ALU are the MLPs + LayerNorms. Awkwardly, as their params are not shared across layers, the ALU changes at each clock cycle. Optionally the MLPs may also be interpreted as supporting a kind of fixed knowledge database lookup.
The programs always takes the form [[LOAD, ALU]*N, STORE]*M, where N is n_layer and M is num_tokens.
## Architecture
GPT feels closer to a fixed-function than stored-program computer because the number of parameters is so large. In contrast, the description length of a CPU is very low and all the action is in the memory configuration.
Another way to look at it is that GPT is a much more bloated/complex computer. Which is fine because it is not engineered but optimized and the upshot is that the programs can be shorter.
Brad Matthews retweeted
Saw a dude writing code in a coffee shop, no Copilot, no ChatGPT, just straight raw dogging VSCode









































