Instructions to use tony10101105/LatentQA-Llama-3.1-8B-Instruct-Lora-14000steps with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use tony10101105/LatentQA-Llama-3.1-8B-Instruct-Lora-14000steps with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-3.1-8B-Instruct") model = PeftModel.from_pretrained(base_model, "tony10101105/LatentQA-Llama-3.1-8B-Instruct-Lora-14000steps") - Transformers
How to use tony10101105/LatentQA-Llama-3.1-8B-Instruct-Lora-14000steps with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tony10101105/LatentQA-Llama-3.1-8B-Instruct-Lora-14000steps")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("tony10101105/LatentQA-Llama-3.1-8B-Instruct-Lora-14000steps", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tony10101105/LatentQA-Llama-3.1-8B-Instruct-Lora-14000steps with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tony10101105/LatentQA-Llama-3.1-8B-Instruct-Lora-14000steps" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tony10101105/LatentQA-Llama-3.1-8B-Instruct-Lora-14000steps", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/tony10101105/LatentQA-Llama-3.1-8B-Instruct-Lora-14000steps
- SGLang
How to use tony10101105/LatentQA-Llama-3.1-8B-Instruct-Lora-14000steps 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 "tony10101105/LatentQA-Llama-3.1-8B-Instruct-Lora-14000steps" \ --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": "tony10101105/LatentQA-Llama-3.1-8B-Instruct-Lora-14000steps", "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 "tony10101105/LatentQA-Llama-3.1-8B-Instruct-Lora-14000steps" \ --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": "tony10101105/LatentQA-Llama-3.1-8B-Instruct-Lora-14000steps", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use tony10101105/LatentQA-Llama-3.1-8B-Instruct-Lora-14000steps with Docker Model Runner:
docker model run hf.co/tony10101105/LatentQA-Llama-3.1-8B-Instruct-Lora-14000steps
[8th March 2026 Update]: Upload a new model (overriding the original one) without adapter on lm_head. Lora adapter on lm_head invokes a subtle issue on Peft that leads to device mismatch when using multi-gpus.
Model Card for Model ID
This model replicates LatentQA activation decoder for Llama-3.1-8B-Instruct. The original release of LatentQA decoder is Llama-3-8B-Instruct-based. This model has the same explantion results on the "promote_veganism" example documented in the repo of original work.
Model Details
Activation decoder to interpret Llama-3.1-8B-Instruct's internal activations with natural language descriptions.
- Developed by: Tony Wu
- License: MIT
- Finetuned from model: Llama-3.1-8B-Instruct
Uses
Please refer to https://github.com/aypan17/latentqa
Bias, Risks, and Limitations
The LatentQA fine-tuning is not extensive. The decoder is only good at answering questions analogous to fine-tuning dataset.
Framework versions
- PEFT 0.18.0
- Downloads last month
- 7
Model tree for tony10101105/LatentQA-Llama-3.1-8B-Instruct-Lora-14000steps
Base model
meta-llama/Llama-3.1-8B