Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Explore large language models in 512MB of RAM
| Date | Stars |
|---|---|
| 2026-07-24 | 1192 |
| 2026-07-25 | 1192 |
| 2026-07-28 | 1192 |
| 2026-07-30 | 1192 |
| 2026-07-31 | 1193 |
| 2026-08-06 | 1193 |
Today
— stars today
This week
+1 stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.08%/day
Language Models
===============
[](https://badge.fury.io/py/languagemodels)
[](https://languagemodels.netlify.app/)
[](https://github.com/jncraton/languagemodels/actions/workflows/lint.yml)
[](https://github.com/jncraton/languagemodels/actions/workflows/test.yml)
[](https://colab.research.google.com/github/jncraton/languagemodels/blob/master/examples/translate.ipynb)
Python building blocks to explore large language models in as little as 512MB of RAM

This package makes using large language models from Python as simple as possible. All inference is performed locally to keep your data private by default.
Installation and Getting Started
--------------------------------
This package can be installed using the following command:
```sh
pip install languagemodels
```
Once installed, you should be able to interact with the package in Python as follows:
```python
>>> import languagemodels as lm
>>> lm.do("What color is the sky?")
'The color of the sky is blue.'
```
This will require downloading a significant amount of data (~250MB) on the first run. Models will be cached for later use and subsequent calls should be quick.
Example Usage
-------------
Here are some usage examples as Python REPL sessions. This should work in the REPL, notebooks, or in traditional scripts and applications.
### Instruction Following
```python
>>> import languagemodels as lm
>>> lm.do("Translate to English: Hola, mundo!")
'Hello, world!'
>>> lm.do("What is the capital of France?")
'Paris.'
```
Outputs can be restricted to a list of choices if desired:
```python
>>> lm.do("Is Mars larger than Saturn?", choices=["Yes", "No"])
'No'
```
### Adjusting Model Performance
The base model should run quickly on any system with 512MB of memory, but this memory limit can be increased to select more powerful models that will consume more resources. Here's an example:
```python
>>> import languagemodels as lm
>>> lm.do("If I have 7 apples then eat 5, how many apples do I have?")
'You have 8 apples.'
>>> lm.config["max_ram"] = "4gb"
4.0
>>> lm.do("If I have 7 apples then eat 5, how many apples do I have?")
'I have 2 apples left.'
```
### GPU Acceleration
If you have an NVIDIA GPU with CUDA available, you can opt in to using the GPU for inference:
```python
>>> import languagemodels as lm
>>> lm.config["device"] = "auto"
```
### Text Completions
```python
>>> import languagemodels as lm
>>> lm.complete("She hid in her room until")
'she was sure she was safe'
```
### External Retrieval
Helper functions are provided to retrieve text from external sources that can be used to augment prompt context.
```python
>>> import languagemodels as lm
>>> lm.get_wiki('Chemistry')
'Chemistry is the scientific study...
>>> lm.get_weather(41.8, -87.6)
'Partly cloudy with a chance of rain...
>>> lm.get_date()
'Friday, May 12, 2023 at 09:27AM'
```
Here's an example showing how this can be used (compare to previous chat example):
```python
>>> lm.do(f"It is {lm.get_date()}. What time is it?")
'The time is 12:53PM.'
```
### Semantic Search
Semantic search is provided to retrieve documents that may provide helpful context from a document store.
```python
>>> import languagemodels as lm
>>> lm.store_doc(lm.get_wiki("Python"), "Python")
>>> lm.store_doc(lm.get_wiki("C language"), "C")
>>> lm.store_doc(lm.get_wiki("Javascript"), "Javascript")
>>> lm.get_doc_context("What does it mean for batteries to be included in a language?")
'From Python document: It is often described as a "batteries included" language due to its comprehensive standard librarExcerpt of 7,108 characters
Read on GitHub749
3
Ikko Eltociear Ashimine · Japan
1
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:38c54a4f99639da2, topic:llm
matched fp:38c54a4f99639da2, topic:nlp