Skip to content

Instantly share code, notes, and snippets.

@yoavg
yoavg / LLMs.md
Last active February 17, 2024 18:39

Some remarks on Large Language Models

Yoav Goldberg, January 2023

Audience: I assume you heard of chatGPT, maybe played with it a little, and was imressed by it (or tried very hard not to be). And that you also heard that it is "a large language model". And maybe that it "solved natural language understanding". Here is a short personal perspective of my thoughts of this (and similar) models, and where we stand with respect to language understanding.

Intro

Around 2014-2017, right within the rise of neural-network based methods for NLP, I was giving a semi-academic-semi-popsci lecture, revolving around the story that achieving perfect language modeling is equivalent to being as intelligent as a human. Somewhere around the same time I was also asked in an academic panel "what would you do if you were given infinite compute and no need to worry about labour costs" to which I cockily responded "I would train a really huge language model, just to show that it doesn't solve everything!". We

@zachleat
zachleat / README.md
Last active June 3, 2024 15:48 — forked from pspeter3/.eleventyignore
Eleventy 11ty.js Extensions
"use strict";
import type { LexicalEditor, LexicalNode } from "Lexical";
import type { Binding, Provider } from "LexicalYjs";
import {
createBinding,
syncLexicalUpdateToYjs,
syncYjsChangesToLexical,
} from "LexicalYjs";
@solarkraft
solarkraft / custom.css
Last active March 2, 2024 12:08
Logseq custom.css for publishing
/*** Publishing: Hide things that aren't very useful for a read-only view */
/** Hide page properties (public pages will always have public: true) */
.content .pre-block { display: none; }
/** Title */
/* Make title non-editable */
#main-container .page-title { pointer-events: none; }
/** Hide useless sidebar stuff */
@jackrusher
jackrusher / trinity.js
Created March 29, 2021 09:23
A fast, minimal JS triple store implementation in ~70 lines of code
// three indices to efficiently support all lookups
function createDB() {
return {eav: new Map(),
ave: new Map(),
vea: new Map()};
}
function addToIndex(xs, x, y, z, triple) {
let ys = xs.get(x);
if(ys == undefined) {
@yonatane
yonatane / logseq-todo-query.clj
Created March 27, 2021 21:33
Logseq query example: all TODOs that are tagged or has an ancestor (including page) that is tagged with #clojure
#+BEGIN_QUERY
{:query
[:find (pull ?b [*])
:where
[?b :block/marker "TODO"]
[?b :block/page ?p]
(or [?b :block/path-ref-pages [:page/name "clojure"]]
[?p :page/tags [:page/name "clojure"]]
[?p :page/name "clojure"])
]}
This file has been truncated, but you can view the full file.
{
"user_name": "",
"num_solved": 0,
"num_total": 1788,
"ac_easy": 0,
"ac_medium": 0,
"ac_hard": 0,
"stat_status_pairs": [
{
"stat": {
@gdpotter
gdpotter / react-sample.ts
Created July 1, 2020 12:12
S3/CloudFront CodePipeline Static Site CDK Stack
import {App, Duration, SecretValue, Stack, StackProps} from "@aws-cdk/core";
import {Bucket} from "@aws-cdk/aws-s3";
import {CloudFrontWebDistribution, OriginAccessIdentity, PriceClass} from '@aws-cdk/aws-cloudfront'
import {PolicyStatement} from "@aws-cdk/aws-iam";
import {BuildSpec, LinuxBuildImage, PipelineProject} from "@aws-cdk/aws-codebuild";
import {Artifact, Pipeline} from "@aws-cdk/aws-codepipeline";
import {
CacheControl,
CodeBuildAction,
GitHubSourceAction,
@shijij
shijij / gist:54c9b21f26c08a15a70c182f03cb15b4
Created November 14, 2017 12:31
Nginx ssl reverse proxy with SNI
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name yourdomain
ssl_certificate /etc/ssl/localcerts/yourdomain.crt;
ssl_certificate_key /etc/ssl/localcerts/yourdomain.key;
ssl_ecdh_curve prime256v1;
ssl_session_cache builtin:1000 shared:SSL:10m;
@briansunter
briansunter / distinct-by.clj
Last active May 15, 2023 22:28
distinct-by clojure transducer
(defn distinct-by
"Returns a lazy sequence of the elements of coll, removing duplicates of (f item).
Returns a stateful transducer when no collection is provided."
{:added "1.0"}
([f]
(fn [rf]
(let [seen (volatile! #{})]
(fn
([] (rf))
([result] result)