Text Generation
Transformers
Safetensors
English
mindi
code
python
javascript
local-llm
offline
custom_code
Instructions to use Mindigenous/MINDI-1.0-420M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Mindigenous/MINDI-1.0-420M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Mindigenous/MINDI-1.0-420M", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Mindigenous/MINDI-1.0-420M", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Mindigenous/MINDI-1.0-420M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Mindigenous/MINDI-1.0-420M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Mindigenous/MINDI-1.0-420M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Mindigenous/MINDI-1.0-420M
- SGLang
How to use Mindigenous/MINDI-1.0-420M 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 "Mindigenous/MINDI-1.0-420M" \ --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": "Mindigenous/MINDI-1.0-420M", "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 "Mindigenous/MINDI-1.0-420M" \ --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": "Mindigenous/MINDI-1.0-420M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Mindigenous/MINDI-1.0-420M with Docker Model Runner:
docker model run hf.co/Mindigenous/MINDI-1.0-420M
Configuration Parsing Warning:In UNKNOWN_FILENAME: "auto_map.AutoTokenizer" must be a string
MINDI 1.0 420M
MINDI 1.0 420M is a 420M-parameter coding language model focused on Python first and JavaScript second. It is built for local, offline code generation workflows.
Capabilities
- Code generation from natural language prompts
- Code completion
- Bug-fix suggestions
- Code explanation
Model Details
- Parameters: 423,934,848
- Architecture: Decoder-only Transformer
- Context length: 2048 tokens
- Focus languages: Python, JavaScript
Hardware Requirements
Recommended:
- NVIDIA GPU with 8GB+ VRAM
- CUDA-enabled PyTorch
Minimum:
- CPU inference works but is slower
Quick Start (GPU)
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
repo_id = "YOUR_USERNAME/MINDI-1.0-420M"
tokenizer = AutoTokenizer.from_pretrained(repo_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
repo_id,
trust_remote_code=True,
torch_dtype=torch.float16,
).cuda()
prompt = "Write a Python function to check if a string is a palindrome."
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
with torch.no_grad():
output = model.generate(
**inputs,
max_new_tokens=220,
temperature=0.2,
top_p=0.9,
do_sample=True,
)
print(tokenizer.decode(output[0], skip_special_tokens=True))
Limitations
- The model can still produce syntax or logic errors.
- Generated code should always be reviewed and tested.
- Not intended for safety-critical production use without validation.
Safety
Always run tests and static checks before using generated code in production.
- Downloads last month
- 4