Instructions to use Duke-CEI-SVD/Llama-3.1-8B-Dense-Basis with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Duke-CEI-SVD/Llama-3.1-8B-Dense-Basis with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Duke-CEI-SVD/Llama-3.1-8B-Dense-Basis")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Duke-CEI-SVD/Llama-3.1-8B-Dense-Basis") model = AutoModelForCausalLM.from_pretrained("Duke-CEI-SVD/Llama-3.1-8B-Dense-Basis", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Duke-CEI-SVD/Llama-3.1-8B-Dense-Basis with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Duke-CEI-SVD/Llama-3.1-8B-Dense-Basis" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Duke-CEI-SVD/Llama-3.1-8B-Dense-Basis", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Duke-CEI-SVD/Llama-3.1-8B-Dense-Basis
- SGLang
How to use Duke-CEI-SVD/Llama-3.1-8B-Dense-Basis 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 "Duke-CEI-SVD/Llama-3.1-8B-Dense-Basis" \ --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": "Duke-CEI-SVD/Llama-3.1-8B-Dense-Basis", "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 "Duke-CEI-SVD/Llama-3.1-8B-Dense-Basis" \ --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": "Duke-CEI-SVD/Llama-3.1-8B-Dense-Basis", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Duke-CEI-SVD/Llama-3.1-8B-Dense-Basis with Docker Model Runner:
docker model run hf.co/Duke-CEI-SVD/Llama-3.1-8B-Dense-Basis
Llama 3.1 8B Dense Reference (FP16)
Built with Llama.
This is the dense reference model used with the BASIS research project. It is an
FP16 reserialization of the Meta Llama 3.1 8B pretrained base model
at revision d04e592bb4f6aa9cfee91e2e20afa771667e1d4b. The source weights
were BF16. This export converts them to FP16; it does not apply BASIS compression,
recovery, or additional training. Numerical results can differ from the BF16 source.
The repository includes a complete Transformers configuration, tokenizer, and sharded safetensors weights. Load it with:
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "Duke-CEI-SVD/Llama-3.1-8B-Dense-Basis"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, dtype="float16", device_map="auto")
Use is subject to the included Llama 3.1 Community License and Meta's Acceptable Use Policy. The required attribution is in NOTICE.
- Downloads last month
- 8
Model tree for Duke-CEI-SVD/Llama-3.1-8B-Dense-Basis
Base model
meta-llama/Llama-3.1-8B