Instructions to use ForSureTesterSim/Llama-3.1-8B-TransMLA-PreRecovery with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ForSureTesterSim/Llama-3.1-8B-TransMLA-PreRecovery with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ForSureTesterSim/Llama-3.1-8B-TransMLA-PreRecovery")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ForSureTesterSim/Llama-3.1-8B-TransMLA-PreRecovery") model = AutoModelForCausalLM.from_pretrained("ForSureTesterSim/Llama-3.1-8B-TransMLA-PreRecovery", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ForSureTesterSim/Llama-3.1-8B-TransMLA-PreRecovery with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ForSureTesterSim/Llama-3.1-8B-TransMLA-PreRecovery" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ForSureTesterSim/Llama-3.1-8B-TransMLA-PreRecovery", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ForSureTesterSim/Llama-3.1-8B-TransMLA-PreRecovery
- SGLang
How to use ForSureTesterSim/Llama-3.1-8B-TransMLA-PreRecovery 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 "ForSureTesterSim/Llama-3.1-8B-TransMLA-PreRecovery" \ --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": "ForSureTesterSim/Llama-3.1-8B-TransMLA-PreRecovery", "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 "ForSureTesterSim/Llama-3.1-8B-TransMLA-PreRecovery" \ --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": "ForSureTesterSim/Llama-3.1-8B-TransMLA-PreRecovery", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ForSureTesterSim/Llama-3.1-8B-TransMLA-PreRecovery with Docker Model Runner:
docker model run hf.co/ForSureTesterSim/Llama-3.1-8B-TransMLA-PreRecovery
File size: 1,252 Bytes
de6110c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | {
"transformers_version": "5.14.1",
"architectures": [
"TransLlamaForCausalLM"
],
"output_hidden_states": false,
"return_dict": true,
"dtype": "bfloat16",
"chunk_size_feed_forward": 0,
"is_encoder_decoder": false,
"id2label": {
"0": "LABEL_0",
"1": "LABEL_1"
},
"label2id": {
"LABEL_0": 0,
"LABEL_1": 1
},
"problem_type": null,
"vocab_size": 128256,
"hidden_size": 4096,
"intermediate_size": 14336,
"num_hidden_layers": 32,
"num_attention_heads": 32,
"num_key_value_heads": 8,
"hidden_act": "silu",
"max_position_embeddings": 131072,
"initializer_range": 0.02,
"rms_norm_eps": 1e-05,
"use_cache": false,
"pad_token_id": null,
"bos_token_id": 128000,
"eos_token_id": 128001,
"pretraining_tp": 1,
"tie_word_embeddings": false,
"rope_parameters": {
"factor": 8.0,
"low_freq_factor": 1.0,
"high_freq_factor": 4.0,
"original_max_position_embeddings": 8192,
"rope_type": "llama3",
"rope_theta": 500000.0
},
"attention_bias": false,
"attention_dropout": 0.0,
"mlp_bias": false,
"head_dim": 128,
"_name_or_path": "meta-llama/Llama-3.1-8B",
"model_type": "llama",
"output_attentions": false,
"kv_lora_rank": 512,
"qk_rope_head_dim": 64
} |