Skip to content

Commit

Permalink
v0.0.1 readme
Browse files Browse the repository at this point in the history
  • Loading branch information
connortbot committed Sep 24, 2024
1 parent 5f54767 commit 346049f
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 7 deletions.
59 changes: 52 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,64 @@

Solomonoff is a compact pipeline for local LLM inference.

This is an implementation for LLM inference from scratch using PyTorch. It is for practice and learning, and is not ready for production use. Use with caution!

## New in v0.0.1+
- `solomonoff` performs inference on `TinyLlama-1.1B-Chat-v1.0`.

## Getting Started & Usage
`solomonoff v0.0.1` can run simple prompts with `TinyLlama-1.1B-Chat-v1.0`.

The `.safetensors` file for `tinyllama` should be downloaded to some path and passed into `CasualLM`.

- Simple response printing
```python
model_args = ARGS_MAP["TinyLlama-1.1B-Chat-v1.0"]
# Create Tokenizer
tokenizer = AutoTokenizer.from_pretrained("TinyLlama/TinyLlama-1.1B-Chat-v1.0", trust_remote_code=True)
model = CausalLM.from_pretrained(
"files/TinyLlama-1.1B-Chat-v1.0/model.safetensors",
model_args,
strict=True,
)
model.eval()
pipeline = Pipeline(
model=model,
tokenizer=tokenizer,
model_name="TinyLlama-1.1B-Chat-v1.0", # not used
)
prompt = "Tell me about George Washington."
history = []
for out, response in pipeline._generate(
prompt, history=history, device="cpu"
):
os.system(get_clear_command())
print(out, flush=True)
```


## Results
`solomonoff v0.0.1` successfully performs inference on `tinyllama`.
Here he is explaining George Washington!

![TinyLlama discusses Washington](imgs/george_washington.png)

## Roadmap
### Supported Models
- [ ] tinyllama
- [X] tinyllama
- [ ] llama2
- [ ] Qwen
- [ ] Command
- [ ] Command-R

## New in vX.X.X+
Nothing new to see here...come back later!
### Sampling
- [X] Temperature
- [ ] top_k
- [ ] top_p
- [ ] beam search

## Getting Started & Usage
Nothing new to see here...come back later!
### Decoding
- [ ] Speculative Decoding

## Performance
Nothing new to see here...come back later!
### Misc.
- [ ] Quantization
Binary file added imgs/george_washington.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 346049f

Please sign in to comment.