Text Generation
Transformers
Safetensors
English
llama
llama3
meta
bitnet
full bitnet
text-generation-inference
Instructions to use limin-arc/llama3-8b-1.58bit-pretrained with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use limin-arc/llama3-8b-1.58bit-pretrained with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="limin-arc/llama3-8b-1.58bit-pretrained")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("limin-arc/llama3-8b-1.58bit-pretrained") model = AutoModelForCausalLM.from_pretrained("limin-arc/llama3-8b-1.58bit-pretrained", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use limin-arc/llama3-8b-1.58bit-pretrained with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "limin-arc/llama3-8b-1.58bit-pretrained" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "limin-arc/llama3-8b-1.58bit-pretrained", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/limin-arc/llama3-8b-1.58bit-pretrained
- SGLang
How to use limin-arc/llama3-8b-1.58bit-pretrained 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 "limin-arc/llama3-8b-1.58bit-pretrained" \ --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": "limin-arc/llama3-8b-1.58bit-pretrained", "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 "limin-arc/llama3-8b-1.58bit-pretrained" \ --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": "limin-arc/llama3-8b-1.58bit-pretrained", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use limin-arc/llama3-8b-1.58bit-pretrained with Docker Model Runner:
docker model run hf.co/limin-arc/llama3-8b-1.58bit-pretrained
Download model-00007-of-00008.safetensors from limin-arc/llama3-8b-1.58bit-pretrained: direct link, hf CLI and curl.
- Browser
- Download file 4.13 GB
-
https://huggingface.co/limin-arc/llama3-8b-1.58bit-pretrained/resolve/main/model-00007-of-00008.safetensors
- Command line
-
hf download hf://limin-arc/llama3-8b-1.58bit-pretrained/model-00007-of-00008.safetensors
-
curl -L -o model-00007-of-00008.safetensors https://huggingface.co/limin-arc/llama3-8b-1.58bit-pretrained/resolve/main/model-00007-of-00008.safetensors
4.13 GB
- Xet hash:
- 9aff4247ff4c3804951055b3a388ff869b9f0a8e6ca86bb1ec28afc274183c44
- Size of remote file:
- 4.13 GB
- SHA256:
- 6434e35000e033978de441b681fde4e4ce73b482491b2b9c26719e9e51fe9b3a
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.