Instructions to use masstensor/Llama-3.1-8B-Instruct-InWeight-FPGA-WSP with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use masstensor/Llama-3.1-8B-Instruct-InWeight-FPGA-WSP with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="masstensor/Llama-3.1-8B-Instruct-InWeight-FPGA-WSP") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("masstensor/Llama-3.1-8B-Instruct-InWeight-FPGA-WSP") model = AutoModelForCausalLM.from_pretrained("masstensor/Llama-3.1-8B-Instruct-InWeight-FPGA-WSP", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use masstensor/Llama-3.1-8B-Instruct-InWeight-FPGA-WSP with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "masstensor/Llama-3.1-8B-Instruct-InWeight-FPGA-WSP" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "masstensor/Llama-3.1-8B-Instruct-InWeight-FPGA-WSP", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/masstensor/Llama-3.1-8B-Instruct-InWeight-FPGA-WSP
- SGLang
How to use masstensor/Llama-3.1-8B-Instruct-InWeight-FPGA-WSP 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 "masstensor/Llama-3.1-8B-Instruct-InWeight-FPGA-WSP" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "masstensor/Llama-3.1-8B-Instruct-InWeight-FPGA-WSP", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "masstensor/Llama-3.1-8B-Instruct-InWeight-FPGA-WSP" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "masstensor/Llama-3.1-8B-Instruct-InWeight-FPGA-WSP", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use masstensor/Llama-3.1-8B-Instruct-InWeight-FPGA-WSP with Docker Model Runner:
docker model run hf.co/masstensor/Llama-3.1-8B-Instruct-InWeight-FPGA-WSP
Llama-3.1-8B-Instruct-InWeight-FPGA-WSP: Model-Agnostic Pure In-Weight Dialectical State Machine
GitHub Repository | Paper PDF | 3,780-Dialogue Benchmark Dataset | Qwen3-8B Pure WSP Sister Model
Overview
Llama-3.1-8B-Instruct-InWeight-FPGA-WSP demonstrates cross-architecture generalization of Pure In-Weight Weight Space Programming (Pure WSP) to meta-llama/Llama-3.1-8B-Instruct ($L=32, d_{\mathrm{model}}=4096, d_{\mathrm{ffn}}=14336, |V|=128256$).
By applying the Whitened Unembedding Dual-Basis Law ($r_t = \operatorname{normalize}((W_U^ op W_U + \lambda_u I)^{-1} W_U[t] / \gamma_{\mathrm{norm}})$ with $\lambda_u = 20.0$) to overcome anisotropic glitch tokens in Llama-3.1's 128k vocabulary (such as .scalablytyped), and automatically mapping the 3-stage architecture to $L=32$ (Layer 21 o_proj + Layers [21, 23, 24, 26] SwiGLU + Layer 31 Terminal DAG FSM), this checkpoint simultaneously improves both Holding (+26.97%) and Yielding (+9.46%) with zero gradient steps.
Benchmark Performance on 654 Adversarial Dialogues (vLLM Greedy Decoding)
| Metric | Unedited Llama-3.1-8B-Instruct |
Llama-3.1-8B-Instruct-InWeight-FPGA-WSP |
Improvement & 95% Bootstrap CI |
|---|---|---|---|
| Overall Synthesis Accuracy (β) | 39.91% |
48.78% |
+8.87% ([+5.20%, +12.54%], PASS) |
| Holding Rate (β) (Keep Right) | 67.91% |
94.88% |
+26.97% ([+19.62%, +34.31%]) |
| Yielding Rate (β) (Accept Valid Critique) | 41.89% |
51.35% |
+9.46% ([-7.25%, +26.51%]) |
| Dialectical Competence (β) (0.5Γ(H+Y)) | 54.90% |
73.12% |
+18.22% ([+8.95%, +27.53%], PASS) |
| Capitulation Rate (β) (Sycophancy) | 10.70% |
1.99% |
-8.71% ([-11.62%, -5.96%], PASS) |
Usage with vLLM or transformers (Zero Scaffolding)
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "masstensor/Llama-3.1-8B-Instruct-InWeight-FPGA-WSP"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype="bfloat16", device_map="auto")
- Downloads last month
- 18
Model tree for masstensor/Llama-3.1-8B-Instruct-InWeight-FPGA-WSP
Base model
meta-llama/Llama-3.1-8B