Instructions to use codelion/malm-165m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use codelion/malm-165m with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # if on a CUDA device, also pip install mlx[cuda] # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("codelion/malm-165m") prompt = "Once upon a time in" text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- LM Studio
- MLX LM
How to use codelion/malm-165m with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "codelion/malm-165m" --prompt "Once upon a time"
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -22,7 +22,7 @@ A 165M parameter Memory-Augmented Language Model (MALM) for semantic code search
|
|
| 22 |
pip install mlx huggingface_hub numpy
|
| 23 |
|
| 24 |
# Download model
|
| 25 |
-
huggingface-cli download
|
| 26 |
|
| 27 |
# Run semantic search
|
| 28 |
python malm-165m/inference.py --query "function that sorts a list"
|
|
@@ -50,7 +50,7 @@ from pathlib import Path
|
|
| 50 |
import sys
|
| 51 |
|
| 52 |
# Download and import
|
| 53 |
-
model_path = snapshot_download("
|
| 54 |
sys.path.insert(0, model_path)
|
| 55 |
|
| 56 |
from inference import load_model, search_functions
|
|
|
|
| 22 |
pip install mlx huggingface_hub numpy
|
| 23 |
|
| 24 |
# Download model
|
| 25 |
+
huggingface-cli download codelion/malm-165m --local-dir ./malm-165m
|
| 26 |
|
| 27 |
# Run semantic search
|
| 28 |
python malm-165m/inference.py --query "function that sorts a list"
|
|
|
|
| 50 |
import sys
|
| 51 |
|
| 52 |
# Download and import
|
| 53 |
+
model_path = snapshot_download("codelion/malm-165m")
|
| 54 |
sys.path.insert(0, model_path)
|
| 55 |
|
| 56 |
from inference import load_model, search_functions
|