Instructions to use modularai/replit-code-1.5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use modularai/replit-code-1.5 with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="modularai/replit-code-1.5", filename="replit-code-v1_5-3b-bf16.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use modularai/replit-code-1.5 with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf modularai/replit-code-1.5:BF16 # Run inference directly in the terminal: llama-cli -hf modularai/replit-code-1.5:BF16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf modularai/replit-code-1.5:BF16 # Run inference directly in the terminal: llama-cli -hf modularai/replit-code-1.5:BF16
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf modularai/replit-code-1.5:BF16 # Run inference directly in the terminal: ./llama-cli -hf modularai/replit-code-1.5:BF16
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf modularai/replit-code-1.5:BF16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf modularai/replit-code-1.5:BF16
Use Docker
docker model run hf.co/modularai/replit-code-1.5:BF16
- LM Studio
- Jan
- Ollama
How to use modularai/replit-code-1.5 with Ollama:
ollama run hf.co/modularai/replit-code-1.5:BF16
- Unsloth Studio
How to use modularai/replit-code-1.5 with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for modularai/replit-code-1.5 to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for modularai/replit-code-1.5 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for modularai/replit-code-1.5 to start chatting
- Docker Model Runner
How to use modularai/replit-code-1.5 with Docker Model Runner:
docker model run hf.co/modularai/replit-code-1.5:BF16
- Lemonade
How to use modularai/replit-code-1.5 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull modularai/replit-code-1.5:BF16
Run and chat with the model
lemonade run user.replit-code-1.5-BF16
List all available models
lemonade list
| { | |
| "architectures": [ | |
| "MPTForCausalLM" | |
| ], | |
| "attn_config": { | |
| "alibi": true, | |
| "alibi_bias_max": 8, | |
| "attn_impl": "torch", | |
| "attn_pdrop": 0.0, | |
| "attn_type": "grouped_query_attention", | |
| "attn_uses_sequence_id": false, | |
| "clip_qkv": null, | |
| "kv_n_heads": 8, | |
| "prefix_lm": false, | |
| "qk_ln": false, | |
| "softmax_scale": null | |
| }, | |
| "auto_map": { | |
| "AutoConfig": "configuration_mpt.MPTConfig", | |
| "AutoModelForCausalLM": "modeling_mpt.MPTForCausalLM" | |
| }, | |
| "d_model": 3072, | |
| "emb_pdrop": 0.0, | |
| "embedding_fraction": 1.0, | |
| "expansion_ratio": 4, | |
| "fc_type": "torch", | |
| "ffn_config": { | |
| "fc_type": "torch", | |
| "ffn_type": "mptmlp" | |
| }, | |
| "init_config": { | |
| "emb_init_std": null, | |
| "emb_init_uniform_lim": null, | |
| "fan_mode": "fan_in", | |
| "init_div_is_residual": true, | |
| "init_gain": 0.0, | |
| "init_nonlinearity": "relu", | |
| "init_std": null, | |
| "name": "kaiming_normal_" | |
| }, | |
| "init_device": "cpu", | |
| "learned_pos_emb": false, | |
| "logit_scale": null, | |
| "max_seq_len": 4096, | |
| "model_type": "mpt", | |
| "n_heads": 24, | |
| "n_layers": 32, | |
| "no_bias": true, | |
| "norm_type": "low_precision_layernorm", | |
| "resid_pdrop": 0.0, | |
| "torch_dtype": "bfloat16", | |
| "transformers_version": "4.33.3", | |
| "use_cache": false, | |
| "vocab_size": 32768 | |
| } | |