Text Generation
Transformers
Safetensors
code
fela
fourier-neural-operator
fno
gated-deltanet
cpu
on-device
autocomplete
fill-in-the-middle
constant-memory
custom_code
Eval Results (legacy)
Instructions to use lowdown-labs/fela-autocomplete with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lowdown-labs/fela-autocomplete with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="lowdown-labs/fela-autocomplete", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("lowdown-labs/fela-autocomplete", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use lowdown-labs/fela-autocomplete with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "lowdown-labs/fela-autocomplete" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lowdown-labs/fela-autocomplete", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/lowdown-labs/fela-autocomplete
- SGLang
How to use lowdown-labs/fela-autocomplete with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "lowdown-labs/fela-autocomplete" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lowdown-labs/fela-autocomplete", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "lowdown-labs/fela-autocomplete" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lowdown-labs/fela-autocomplete", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use lowdown-labs/fela-autocomplete with Docker Model Runner:
docker model run hf.co/lowdown-labs/fela-autocomplete
| import argparse | |
| import os | |
| import sys | |
| import torch | |
| sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), "..")) | |
| from modeling import load_model | |
| def main(): | |
| ap = argparse.ArgumentParser() | |
| ap.add_argument( | |
| "--weights", | |
| default=os.environ.get("FELA_LLM_WEIGHTS", ".."), | |
| help="Dir with model.safetensors, config.json, tokenizer.json", | |
| ) | |
| ap.add_argument("--threads", type=int, default=4) | |
| args = ap.parse_args() | |
| torch.set_num_threads(args.threads) | |
| print("Loading FELA LLM 1.5 on CPU (no GPU needed)...") | |
| m = load_model(args.weights, threads=args.threads) | |
| print( | |
| f"Loaded {m.cfg_json.get('n_params', 0) / 1000000000.0:.2f}B params, fim={m.fim_ok}\n" | |
| ) | |
| print("Fill in the middle: prefix + suffix -> the model writes the middle") | |
| prefix = "def add(a, b):\n " | |
| suffix = "\nresult = add(2, 3)\n" | |
| r = m.complete(prefix, suffix, max_tokens=16) | |
| print(f" Prefix: {prefix!r}") | |
| print(f" Suffix: {suffix!r}") | |
| print( | |
| f" Middle: {r['middle']!r} (fim={r['used_fim']}, {r['n_tokens']} tokens, {r['tok_per_s']} tok/s)\n" | |
| ) | |
| print("Plain autocomplete: continue a single line") | |
| for prefix in ["import numpy as ", "from fastapi import ", "for i in range("]: | |
| r = m.complete(prefix, "", max_tokens=12) | |
| print(f" {prefix!r} -> {r['middle']!r}") | |
| print( | |
| "\nThis is the final fill in the middle model. Single line completions land well; multi line blocks and novel logic are outside what it is built for. Every completion is a real forward of the model." | |
| ) | |
| if __name__ == "__main__": | |
| main() | |