Skip to content

Instantly share code, notes, and snippets.

View e-p-armstrong's full-sized avatar
💻
Super hacka-ing

Evan Armstrong e-p-armstrong

💻
Super hacka-ing
View GitHub Profile
@e-p-armstrong
e-p-armstrong / evan-armstrong.json
Last active April 9, 2024 15:12
old-linkedin-json
{"public_identifier": "evan-armstrong-1a84b3200",
"profile_pic_url": "https://s3.us-west-000.backblazeb2.com/proxycurl/person/evan-armstrong-1a84b3200/profile?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=0004d7f56a0400b0000000001%2F20240102%2Fus-west-000%2Fs3%2Faws4_request&X-Amz-Date=20240102T003316Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=370a8026b317710bf26b57118ba0920726a56084c1af26532f0aac3f550db91d",
"background_cover_image_url": "https://s3.us-west-000.backblazeb2.com/proxycurl/person/evan-armstrong-1a84b3200/cover?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=0004d7f56a0400b0000000001%2F20240102%2Fus-west-000%2Fs3%2Faws4_request&X-Amz-Date=20240102T003316Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=7d98277db4277306fe66307cb9c78a33c29210aac20d5b903c73d9b1a6444df8", "first_name": "Evan", "last_name": "Armstrong", "full_name": "Evan Armstrong", "follower_count": 11, "occupation": "Junior AI Software Developer at Leanpub", "headline": "Machine Learning Prac
# Machine Intelligence Made to Impersonate Characteristics: MIMIC
# NOTE run this $ conda install -c conda-forge mpi4py mpich to get mpi working
# accelerate launch --use_deepspeed -m axolotl.cli.train ./config_name_here
base_model: alpindale/Mistral-7B-v0.2-hf
base_model_config: alpindale/Mistral-7B-v0.2-hf
model_type: MistralForCausalLM
tokenizer_type: LlamaTokenizer
is_mistral_derived_model: true
import json
import traceback
# Was this helpful? I have another open source project you can check out if you're interested at https://github.com/e-p-armstrong/augmentoolkit/tree/master
def process_openai_data(input_file, output_file, system_prompt_func):
with open(input_file, 'r') as f_in, open(output_file, 'w') as f_out:
data = json.load(f_in)
for obj in data:
try:
title = obj['title']
system_prompt = system_prompt_func(title)
- role: system
content: |
You are a genius philosopher and reverse-engineerer of ideas. Given an idea (either in short form or long) you will reverse-engineer a instruction that could have produced the idea. The instruction you write will always be 1–3 sentences, and will be of the form "Write a [format of idea] that [core essence of the idea]." The idea is to capture the essence of the idea, not to describe it in its entirety: leave some areas for a writer given the instructions to be creative in. Conciseness and succinctness are valued in your instructions.
- role: user
content: |
### Text To Reverse-Engineer the Instruction of:
-------------
The great tragedy of a lot of history and the present is that it involves a lot of people doing things that are reasonable, even rational and justified — from their perspective — and causing a ton of misery through it. Or being put at odds for reasons that make sense. The fact that so much of it makes sense from the perspective of the parties involv
def has_sequential_chars(string1, string2, n):
"""
Check if any n sequential characters from string1 appear in string2.
Args:
string1 (str): The first string to check.
string2 (str): The second string in which to look for sequences.
n (int): The length of the sequence to check.
Returns:
[
{"conversations": [{"from": "system", "value": "system prompt"}, {"from": "human", "value": "question? Or some other text that the AI responds to. The human OR the AI can go first, either works."}, {"from": "gpt", "value": "Answer. Again, this can be any text."}]},
{"conversations": [{"from": "system", "value": "system prompt"}, {"from": "gpt", "value": "Some text"}, {"from": "human", "value": "Some reply text"}]}
]
import asyncio
import uuid
from openai import AsyncOpenAI
import cohere
try:
from aphrodite import (
EngineArgs,
AphroditeEngine,
SamplingParams,