Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.
| # | |
| # this is adapted from https://github.com/facebookresearch/llama/blob/main/llama/generation.py#L213 | |
| # the tokenizer is replaced with ord() to make it easier to see whats actually happening | |
| from typing_extensions import TypedDict, Literal | |
| from typing import List, Optional | |
| Role = Literal["system", "user", "assistant"] | |
| class Message(TypedDict): |
I am no longer abe to monitor this post , I have decided to move everything to my personal blog for better monitoring.
Please click here to access the full post
| import baker | |
| import json | |
| import os | |
| from cytoolz import merge, join, groupby | |
| from cytoolz.compatibility import iteritems | |
| from cytoolz.curried import update_in | |
| from itertools import starmap | |
| from collections import deque | |
| from lxml import etree, objectify | |
| from scipy.io import savemat |
| """ | |
| this code is not mine! i shamelessly copied it from http://stackoverflow.com/questions/19790188/expanding-english-language-contractions-in-python | |
| all credits go to alko and arturomp @ stack overflow. | |
| basically, it's a big find/replace. | |
| """ | |
| import re | |
| cList = { | |
| "ain't": "am not", |
As configured in my dotfiles.
start new:
tmux
start new with session name: