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
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -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
- Llama new
- 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
Download tinygpt/logs/tensorrt_format.log from Tensormorph/distillgpt2: direct link, hf CLI and curl.
- Browser
- Download file 356 Bytes
-
https://huggingface.co/Tensormorph/distillgpt2/resolve/main/tinygpt/logs/tensorrt_format.log
- Command line
-
hf download hf://Tensormorph/distillgpt2/tinygpt/logs/tensorrt_format.log
-
curl -L -o tensorrt_format.log https://huggingface.co/Tensormorph/distillgpt2/resolve/main/tinygpt/logs/tensorrt_format.log
356 Bytes
| skipped tensorrt .engine from ONNX needs TensorRT + an NVIDIA CUDA GPU (tensorrt importable: False, CUDA: False); on such a machine run this script or: trtexec --onnx=exports/tiny/onnx/tiny.onnx --saveEngine=exports/tiny/tensorrt/tiny.engine --exportLayerInfo=exports/tiny/tensorrt/tiny.layers.json --profilingVerbosity=detailed | |