Instructions to use arthu1/VEG-Transformer-Transplant with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use arthu1/VEG-Transformer-Transplant with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="arthu1/VEG-Transformer-Transplant")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("arthu1/VEG-Transformer-Transplant") model = AutoModelForCausalLM.from_pretrained("arthu1/VEG-Transformer-Transplant", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use arthu1/VEG-Transformer-Transplant with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "arthu1/VEG-Transformer-Transplant" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "arthu1/VEG-Transformer-Transplant", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/arthu1/VEG-Transformer-Transplant
- SGLang
How to use arthu1/VEG-Transformer-Transplant 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 "arthu1/VEG-Transformer-Transplant" \ --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": "arthu1/VEG-Transformer-Transplant", "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 "arthu1/VEG-Transformer-Transplant" \ --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": "arthu1/VEG-Transformer-Transplant", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use arthu1/VEG-Transformer-Transplant with Docker Model Runner:
docker model run hf.co/arthu1/VEG-Transformer-Transplant
VEG Transformer Transplant
Experimental structural transplant. This is not equivalent to the VEG checkpoint.
A standard Transformer cannot directly express VEG's phase-coherence routing,
elementwise sigmoid route gate, causal 1/sqrt(t+1) normalization, or selective
recurrent field. This artifact maps the tensors that have a Llama analogue into
a normal decoder-only Transformer. It is useful as a compatibility baseline and
conversion reference, not as a preserved-quality conversion.
Model
- Architecture:
LlamaForCausalLM - Parameters: 84,042,816
- Vocabulary: 256 bytes
- Context: 512
- Hidden size: 832
- Layers: 10
- Attention heads: 13, head dimension 64
- Intermediate size: 2240
- Precision: FP32
Mapping
emb->model.embed_tokens.weightWq/Wk-> duplicated 64-dimensional q/k headsWv * c->self_attn.v_proj.weightdiag(gs) @ Wo->self_attn.o_proj.weightW1/W3/W2-> SwiGLU projectionsg1/g2/gf-> RMSNorm gainsWout->lm_head.weight
Dropped or approximated VEG behavior is listed in conversion_report.json.
Expect degraded quality relative to the source model.
Use
pip install -r requirements.txt
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained('.', torch_dtype=torch.float32)
tok = AutoTokenizer.from_pretrained('.')
inputs = tok('The capital of France is', return_tensors='pt')
out = model.generate(**inputs, max_new_tokens=200, do_sample=True, temperature=0.8)
print(tok.decode(out[0], skip_special_tokens=False))
The tokenizer is byte-level and has no BOS/EOS token. Generation should use an
explicit max_new_tokens or a custom stopping criterion.
- Downloads last month
- 131