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 sys | |
| import torch | |
| from modeling import load_model | |
| VERIFICATION_TOP5 = [319, 516, 22441, 497, 4102] | |
| def main(): | |
| ap = argparse.ArgumentParser() | |
| ap.add_argument("--weights", default=".") | |
| ap.add_argument("--capture", action="store_true") | |
| args = ap.parse_args() | |
| torch.set_num_threads(1) | |
| m = load_model(args.weights, threads=1) | |
| ids = torch.arange(16, dtype=torch.long).unsqueeze(0) + 100 | |
| with torch.no_grad(): | |
| logits = m.model(ids) | |
| assert logits.dim() == 3 and logits.size(-1) == m.cfg.vocab_size, ( | |
| f"Bad output shape {tuple(logits.shape)} (expected vocab {m.cfg.vocab_size})" | |
| ) | |
| assert torch.isfinite(logits).all(), "Non finite logits" | |
| print(f"Output shape ok {tuple(logits.shape)}") | |
| top5 = logits[0, -1].topk(5).indices.tolist() | |
| if args.capture: | |
| print(f"VERIFICATION_TOP5 = {top5}") | |
| return | |
| if top5 != VERIFICATION_TOP5: | |
| print( | |
| f"[WARNING] top 5 tokens {top5} differ from the reference {VERIFICATION_TOP5}; small CPU numeric differences can move ties across machines" | |
| ) | |
| else: | |
| print("Verification value ok") | |
| r = m.complete("import numpy as ", "", max_tokens=4) | |
| print(f"Sample completion: 'import numpy as ' -> {r['middle']!r}") | |
| if __name__ == "__main__": | |
| main() | |