Paperspace Gradient is a powerful platform by DigitalOcean that allows you to:
Access high-end GPUs (A100, RTX 4090, etc.)
Launch notebooks or containers with minimal setup
Easily install and run open-source LLMs like Kimi K2
Benefit from JupyterLab, volume persistence and SSH access
Prerequisites
Paperspace account: https://www.paperspace.com
Hugging Face account (accept Kimi K2 license)
Basic Python familiarity (Jupyter or CLI)
1. Go to https://www.paperspace.com/gradient
2. Click on “Create Notebook”
3. Select Base Container:
4. Choose machine type:
5. Name your notebook (e.g., Kimi-K2-LLM) and click “Create Notebook”
Open the Jupyter notebook terminal and run:
sudo apt update && sudo apt install -y git-lfs
pip install torch torchvision transformers accelerate huggingface_hub
git lfs install
git clone https://huggingface.co/moonshotai/Kimi-K2-Instruct
cd Kimi-K2-Instruct
Make sure to accept the model license at: https://huggingface.co/moonshotai/Kimi-K2-Instruct
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "moonshotai/Kimi-K2-Instruct"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True, torch_dtype=torch.float16).cuda()
prompt = "Explain generative AI to a 10-year-old."
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=200)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
1. Switch to terminal
2. Create and run a Python script (e.g., app.py)
3. Launch inference from the command line
Enable Persistent Storage to retain:
Model weights
Logs
Generated outputs
Python scripts
Paperspace Gradient is one of the easiest ways to run Kimi K2 in a notebook interface with GPU support. Whether you’re building AI applications, fine-tuning models, or testing prompts this setup is ideal for developers, researchers and solo builders.
Need enterprise grade deployment or DevOps help? Contact our expert AI Squad at OneClick IT Consultancy and let’s build something powerful together.