Instructions to use LMLK/AMD-Llama-135m-code-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LMLK/AMD-Llama-135m-code-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="LMLK/AMD-Llama-135m-code-GGUF")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("LMLK/AMD-Llama-135m-code-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use LMLK/AMD-Llama-135m-code-GGUF 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 LMLK/AMD-Llama-135m-code-GGUF:F32 # Run inference directly in the terminal: llama cli -hf LMLK/AMD-Llama-135m-code-GGUF:F32
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf LMLK/AMD-Llama-135m-code-GGUF:F32 # Run inference directly in the terminal: llama cli -hf LMLK/AMD-Llama-135m-code-GGUF:F32
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 LMLK/AMD-Llama-135m-code-GGUF:F32 # Run inference directly in the terminal: ./build/bin/llama cli -hf LMLK/AMD-Llama-135m-code-GGUF:F32
Use Docker
docker model run hf.co/LMLK/AMD-Llama-135m-code-GGUF:F32
- Llama new
- LM Studio
- Jan
- vLLM
How to use LMLK/AMD-Llama-135m-code-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LMLK/AMD-Llama-135m-code-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LMLK/AMD-Llama-135m-code-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/LMLK/AMD-Llama-135m-code-GGUF:F32
- SGLang
How to use LMLK/AMD-Llama-135m-code-GGUF 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 "LMLK/AMD-Llama-135m-code-GGUF" \ --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": "LMLK/AMD-Llama-135m-code-GGUF", "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 "LMLK/AMD-Llama-135m-code-GGUF" \ --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": "LMLK/AMD-Llama-135m-code-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use LMLK/AMD-Llama-135m-code-GGUF with Ollama:
ollama run hf.co/LMLK/AMD-Llama-135m-code-GGUF:F32
- Unsloth Desktop
- Docker Model Runner
How to use LMLK/AMD-Llama-135m-code-GGUF with Docker Model Runner:
docker model run hf.co/LMLK/AMD-Llama-135m-code-GGUF:F32
- Lemonade
How to use LMLK/AMD-Llama-135m-code-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull LMLK/AMD-Llama-135m-code-GGUF:F32
Run and chat with the model
lemonade run user.AMD-Llama-135m-code-GGUF-F32
List all available models
lemonade list
- Atomic Chat
Commit History
-
Update README.md
Verified signaturece6a691
-
Update README.md
Verified signature71ff2e0 -
Update README.md
Verified signaturebd66412 -
Update README.md
Verified signature7a356d1 -
Update README.md
Verified signature7cd6401 -
Update README.md
Verified signature# AMD-Llama-135m-code-GGUF ## Introduction AMD-Llama-135m is a language model trained on AMD MI250 GPUs. Based on LLaMA2 model architecture, this model can be smoothly loaded as LlamaForCausalLM with huggingface transformers. Furthermore, we use the same tokenizer as LLaMA2, enabling it to be a draft model of speculative decoding for LLaMA2 and CodeLlama. ## Quickstart AMD-Llama-135m-code-GGUF can be loaded and used via Llama.cpp, here is a program with GUI. ```python import sys import os from PyQt5.QtWidgets import (QApplication, QWidget, QLabel, QPushButton, QLineEdit, QTextEdit, QVBoxLayout, QHBoxLayout, QFileDialog, QProgressBar, QMessageBox, QMenu) from PyQt5.QtCore import Qt, QThread, pyqtSignal from llama_cpp import Llama class Worker(QThread): finished = pyqtSignal(str) progress = pyqtSignal(int, int) # Pass total tokens as well def __init__(self, model, messages, max_tokens): super().__init__(…7a17876 -
Upload 2 files
Verified signature933b15f -
initial commit
Verified signatureda0dd38