Instructions to use QuantFactory/plamo-13b-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use QuantFactory/plamo-13b-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="QuantFactory/plamo-13b-GGUF")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("QuantFactory/plamo-13b-GGUF", dtype="auto") - llama-cpp-python
How to use QuantFactory/plamo-13b-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="QuantFactory/plamo-13b-GGUF", filename="plamo-13b.Q2_K.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use QuantFactory/plamo-13b-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf QuantFactory/plamo-13b-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/plamo-13b-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf QuantFactory/plamo-13b-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/plamo-13b-GGUF:Q4_K_M
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 QuantFactory/plamo-13b-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf QuantFactory/plamo-13b-GGUF:Q4_K_M
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 QuantFactory/plamo-13b-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf QuantFactory/plamo-13b-GGUF:Q4_K_M
Use Docker
docker model run hf.co/QuantFactory/plamo-13b-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use QuantFactory/plamo-13b-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "QuantFactory/plamo-13b-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "QuantFactory/plamo-13b-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/QuantFactory/plamo-13b-GGUF:Q4_K_M
- SGLang
How to use QuantFactory/plamo-13b-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 "QuantFactory/plamo-13b-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": "QuantFactory/plamo-13b-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 "QuantFactory/plamo-13b-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": "QuantFactory/plamo-13b-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use QuantFactory/plamo-13b-GGUF with Ollama:
ollama run hf.co/QuantFactory/plamo-13b-GGUF:Q4_K_M
- Unsloth Studio new
How to use QuantFactory/plamo-13b-GGUF 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 QuantFactory/plamo-13b-GGUF 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 QuantFactory/plamo-13b-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for QuantFactory/plamo-13b-GGUF to start chatting
- Docker Model Runner
How to use QuantFactory/plamo-13b-GGUF with Docker Model Runner:
docker model run hf.co/QuantFactory/plamo-13b-GGUF:Q4_K_M
- Lemonade
How to use QuantFactory/plamo-13b-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull QuantFactory/plamo-13b-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.plamo-13b-GGUF-Q4_K_M
List all available models
lemonade list
QuantFactory/plamo-13b-GGUF
This is quantized version of pfnet/plamo-13b created using llama.cpp
Original Model Card
PLaMo-13B
Model Description
PLaMo-13B is a LLaMA-based 13B model pre-trained on English and Japanese open datasets, developed by Preferred Networks, Inc. PLaMo-13B is released under Apache v2.0 license.
PLaMo-13B Release blog (Japanese)
Usage
Requirements
- numpy
- sentencepiece
- torch
- transformers
Use a pipeline as a high-level helper
import transformers
pipeline = transformers.pipeline("text-generation", model="pfnet/plamo-13b", trust_remote_code=True)
print(pipeline("The future of artificial intelligence technology is ", max_new_tokens=32))
Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("pfnet/plamo-13b", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("pfnet/plamo-13b", trust_remote_code=True)
text = "これからの人工知能技術は"
input_ids = tokenizer(text, return_tensors="pt").input_ids
generated_tokens = model.generate(
inputs=input_ids,
max_new_tokens=32,
do_sample=True,
top_k=50,
top_p=0.95,
temperature=1.0,
)[0]
generated_text = tokenizer.decode(generated_tokens)
print(generated_text)
Model Details
- Model size: 13B
- Trained tokens: 1.5T tokens (English: 1.32T tokens, Japanese: 0.18T tokens)
- Context length: 4096
- Developed by: Preferred Networks, Inc
- Model type: Causal decoder-only
- Language(s): English, Japanese
- License: Apache v2.0
Training Dataset
English
- C4 - English
- Project Gutenberg
- RedPajama - Arxiv
- RedPajama - CommonCrawl - English
- RedPajama - Github
- RedPajama - StackExchange
- RedPajama - Wikipedia
Japanese
- mC4 - Japanese
- Wikipedia - Japanese
Tokenizer
PLaMo-13B uses sentencepiece tokenizer which is trained on a subset of the datasets for model pre-training.
Bias, Risks, and Limitations
PLaMo-13B is a new technology that carries risks with use. Testing conducted to date has been in English and Japanese, and has not covered, nor could it cover all scenarios. For these reasons, as with all LLMs, PLaMo-13B’s potential outputs cannot be predicted in advance, and the model may in some instances produce inaccurate, biased or other objectionable responses to user prompts. Therefore, before deploying any applications of PLaMo-13B, developers should perform safety testing and tuning tailored to their specific applications of the model.
How to cite
@online{PLaMo2023Introducing,
author = {Preferred Networks, Inc},
title = {PLaMo-13B},
year = {2023},
url = {https://huggingface.co/pfnet/plamo-13b},
urldate = {2023-09-28}
}
Citations
@article{touvron2023llama,
title={LLaMA: Open and Efficient Foundation Language Models},
author={Touvron, Hugo and Lavril, Thibaut and Izacard, Gautier and Martinet, Xavier and Lachaux, Marie-Anne and Lacroix, Timoth{\'e}e and Rozi{\`e}re, Baptiste and Goyal, Naman and Hambro, Eric and Azhar, Faisal and Rodriguez, Aurelien and Joulin, Armand and Grave, Edouard and Lample, Guillaume},
journal={arXiv preprint arXiv:2302.13971},
year={2023}
}
- Downloads last month
- 123
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit