Text Generation
Transformers
Safetensors
English
Indonesian
xeno_table
xeno
from-scratch
statistical
ngram
chat-template
instruct
ftemb
cpu-trained
conversational
custom_code
Instructions to use Lobus22/Xeno-L2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Lobus22/Xeno-L2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Lobus22/Xeno-L2", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Lobus22/Xeno-L2", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Lobus22/Xeno-L2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Lobus22/Xeno-L2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Lobus22/Xeno-L2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Lobus22/Xeno-L2
- SGLang
How to use Lobus22/Xeno-L2 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 "Lobus22/Xeno-L2" \ --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": "Lobus22/Xeno-L2", "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 "Lobus22/Xeno-L2" \ --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": "Lobus22/Xeno-L2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Lobus22/Xeno-L2 with Docker Model Runner:
docker model run hf.co/Lobus22/Xeno-L2
Xeno L2 dilatih dari nol pada 201.366.770.835 token FineWeb di CPU.
from transformers import AutoModelForCausalLM, AutoTokenizer
m = AutoModelForCausalLM.from_pretrained("Lobus22/Xeno-L2", trust_remote_code=True)
t = AutoTokenizer.from_pretrained("Lobus22/Xeno-L2", trust_remote_code=True)
prompt = t.apply_chat_template([{"role": "user", "content": '"apa itu Xeno?"'}], tokenize=False)
print(t.decode(m.generate(t(prompt, return_tensors="pt").input_ids, max_new_tokens=60)))
Chat template: <//user//>"apa itu Xeno?"<||>X<//assistant//>
Fine-tuning memakai FTEMB (tanpa gradien): python fine_tune_ftemb.py model.safetensors
Batas jujur: ini tabel trigram hashed, bukan transformer saraf. 1.578.507 slot terisi dari 1.073.741.824, jadi kapasitas efektifnya sekitar 1,58 juta konteks. Tidak bisa LoRA, tapi bisa di-FTEMB.
- Downloads last month
- 73