Instructions to use Tensormorph/distillgpt2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use Tensormorph/distillgpt2 with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://Tensormorph/distillgpt2") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Tensormorph/distillgpt2 with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Tensormorph/distillgpt2:F16 # Run inference directly in the terminal: llama cli -hf Tensormorph/distillgpt2:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Tensormorph/distillgpt2:F16 # Run inference directly in the terminal: llama cli -hf Tensormorph/distillgpt2:F16
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 Tensormorph/distillgpt2:F16 # Run inference directly in the terminal: ./llama-cli -hf Tensormorph/distillgpt2:F16
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 Tensormorph/distillgpt2:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf Tensormorph/distillgpt2:F16
Use Docker
docker model run hf.co/Tensormorph/distillgpt2:F16
- LM Studio
- Jan
- Ollama
How to use Tensormorph/distillgpt2 with Ollama:
ollama run hf.co/Tensormorph/distillgpt2:F16
- Unsloth Desktop
- Docker Model Runner
How to use Tensormorph/distillgpt2 with Docker Model Runner:
docker model run hf.co/Tensormorph/distillgpt2:F16
- Lemonade
How to use Tensormorph/distillgpt2 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Tensormorph/distillgpt2:F16
Run and chat with the model
lemonade run user.distillgpt2-F16
List all available models
lemonade list
- Atomic Chat
Welcome to the community
The community tab is the place to discuss and collaborate with the HF community!