Add llms subdir + update README (#145)

* add llms subdir + update README

* nits

* use same pre-commit as mlx

* update readmes a bit

* format
This commit is contained in:
Awni Hannun
2023-12-20 10:22:25 -08:00
committed by GitHub
parent aed14618ca
commit 27c0a8c002
62 changed files with 164 additions and 146 deletions

View File

@@ -2,12 +2,12 @@
import argparse
import json
import numpy as np
from pathlib import Path
import shutil
import os
import torch
import shutil
from pathlib import Path
import numpy as np
import torch
if __name__ == "__main__":
parser = argparse.ArgumentParser(

View File

@@ -32,8 +32,8 @@ class WikiSQL:
def _maybe_download(self, data_dir):
if not os.path.exists(data_dir):
import io
from urllib import request
import tarfile
from urllib import request
url = "https://raw.githubusercontent.com/salesforce/WikiSQL/master/data.tar.bz2"
r = request.urlopen(url)

View File

@@ -3,19 +3,17 @@
import argparse
import json
import math
import numpy as np
from pathlib import Path
from sentencepiece import SentencePieceProcessor
import time
from typing import Optional, Tuple, List
from pathlib import Path
from typing import List, Optional, Tuple
import mlx.core as mx
import mlx.nn as nn
import mlx.optimizers as optim
from mlx.utils import tree_map, tree_flatten, tree_unflatten
from models import ModelArgs, Model, LoRALinear
import numpy as np
from mlx.utils import tree_flatten, tree_map, tree_unflatten
from models import LoRALinear, Model, ModelArgs
from sentencepiece import SentencePieceProcessor
def build_parser():

View File

@@ -1,8 +1,8 @@
# Copyright © 2023 Apple Inc.
from dataclasses import dataclass
import math
from typing import Optional, Tuple, List
from dataclasses import dataclass
from typing import List, Optional, Tuple
import mlx.core as mx
import mlx.nn as nn