Text Generation
Transformers
TensorBoard
Safetensors
llama
Generated from Trainer
conversational
text-generation-inference
Instructions to use AlexHung29629/sllama-6 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AlexHung29629/sllama-6 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AlexHung29629/sllama-6") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("AlexHung29629/sllama-6") model = AutoModelForCausalLM.from_pretrained("AlexHung29629/sllama-6") 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use AlexHung29629/sllama-6 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AlexHung29629/sllama-6" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AlexHung29629/sllama-6", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AlexHung29629/sllama-6
- SGLang
How to use AlexHung29629/sllama-6 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 "AlexHung29629/sllama-6" \ --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": "AlexHung29629/sllama-6", "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 "AlexHung29629/sllama-6" \ --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": "AlexHung29629/sllama-6", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use AlexHung29629/sllama-6 with Docker Model Runner:
docker model run hf.co/AlexHung29629/sllama-6
See axolotl config
axolotl version: 0.13.0.dev0
base_model: /home/alex/Workspace/sllama/out_5/checkpoint-1722000
trust_remote_code: true
resize_token_embeddings_to_32x: true
plugins:
- axolotl.integrations.cut_cross_entropy.CutCrossEntropyPlugin
- axolotl.integrations.liger.LigerPlugin
liger_rope: true
liger_rms_norm: true
liger_glu_activation: true
liger_layer_norm: true
unfrozen_parameters:
- ^(?![\s\S]*embed_tokens)[\s\S]+$
datasets:
- path: lima.jsonl
type: chat_template
dataloader_num_workers: 0
group_by_length: false
dataset_prepared_path: data_prep
output_dir: ./out_6_lima
dataloader_pin_memory: true
shuffle_merged_datasets: true
sequence_len: 2048
sample_packing: true
eval_sample_packing: true
pad_to_sequence_len: true
use_tensorboard: true
use_wandb: true
wandb_project: sllama
gradient_accumulation_steps: 1
micro_batch_size: 1
num_epochs: 4
#max_steps: 100000
save_steps: 100
save_total_limit: 2
save_only_model: true
optimizer: sgd
optim_args:
momentum: 0.98
lr_scheduler: cosine
learning_rate: 0.1
#embedding_lr: 5e-7
cosine_constant_lr_ratio: 0.1
max_grad_norm: 1.0
bf16: auto
fp8: true
gradient_checkpointing: false
gradient_checkpointing_kwargs:
use_reentrant: false
logging_steps: 10
torch_compile: true
torch_compile_backend: inductor
torch_compile_mode: default
flash_attention: true
warmup_ratio: 0.05
weight_decay: 0.01
out_6_lima
This model was trained from scratch on the lima.jsonl dataset.
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 0.1
- train_batch_size: 1
- eval_batch_size: 1
- seed: 42
- optimizer: Use OptimizerNames.SGD and the args are: momentum=0.98
- lr_scheduler_type: cosine
- lr_scheduler_warmup_steps: 64
- training_steps: 1288
Training results
Framework versions
- Transformers 4.56.1
- Pytorch 2.7.1+cu128
- Datasets 4.0.0
- Tokenizers 0.22.1
- Downloads last month
- 5