Text Generation
PEFT
Safetensors
Transformers
llama
axolotl
lora
conversational
text-generation-inference
Instructions to use eason668/19bbda09-bbf4-406e-b7c3-46a03f755d97 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use eason668/19bbda09-bbf4-406e-b7c3-46a03f755d97 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("tokyotech-llm/Llama-3-Swallow-8B-v0.1") model = PeftModel.from_pretrained(base_model, "eason668/19bbda09-bbf4-406e-b7c3-46a03f755d97") - Transformers
How to use eason668/19bbda09-bbf4-406e-b7c3-46a03f755d97 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="eason668/19bbda09-bbf4-406e-b7c3-46a03f755d97") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("eason668/19bbda09-bbf4-406e-b7c3-46a03f755d97") model = AutoModelForMultimodalLM.from_pretrained("eason668/19bbda09-bbf4-406e-b7c3-46a03f755d97") 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 Settings
- vLLM
How to use eason668/19bbda09-bbf4-406e-b7c3-46a03f755d97 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "eason668/19bbda09-bbf4-406e-b7c3-46a03f755d97" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "eason668/19bbda09-bbf4-406e-b7c3-46a03f755d97", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/eason668/19bbda09-bbf4-406e-b7c3-46a03f755d97
- SGLang
How to use eason668/19bbda09-bbf4-406e-b7c3-46a03f755d97 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 "eason668/19bbda09-bbf4-406e-b7c3-46a03f755d97" \ --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": "eason668/19bbda09-bbf4-406e-b7c3-46a03f755d97", "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 "eason668/19bbda09-bbf4-406e-b7c3-46a03f755d97" \ --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": "eason668/19bbda09-bbf4-406e-b7c3-46a03f755d97", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use eason668/19bbda09-bbf4-406e-b7c3-46a03f755d97 with Docker Model Runner:
docker model run hf.co/eason668/19bbda09-bbf4-406e-b7c3-46a03f755d97
# Load model directly
from transformers import AutoTokenizer, AutoModelForMultimodalLM
tokenizer = AutoTokenizer.from_pretrained("eason668/19bbda09-bbf4-406e-b7c3-46a03f755d97")
model = AutoModelForMultimodalLM.from_pretrained("eason668/19bbda09-bbf4-406e-b7c3-46a03f755d97")
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]:]))Quick Links
See axolotl config
axolotl version: 0.13.0.dev0
adapter: lora
base_model: tokyotech-llm/Llama-3-Swallow-8B-v0.1
bf16: true
chat_template: llama3
dataset_prepared_path: null
datasets:
- data_files:
- b74a1932bd791c9f_train_data.json
ds_type: json
format: custom
path: /workspace/input_data/
type:
field_instruction: instruct
field_output: output
format: '{instruction}'
no_input_format: '{instruction}'
system_format: '{system}'
system_prompt: ''
debug: null
deepspeed: null
early_stopping_patience: null
eval_max_new_tokens: 128
eval_table_size: null
evals_per_epoch: 4
flash_attention: true
fp16: null
fsdp: null
fsdp_config: null
gradient_accumulation_steps: 4
gradient_checkpointing: true
group_by_length: false
hub_model_id: eason668/19bbda09-bbf4-406e-b7c3-46a03f755d97
hub_private_repo: false
learning_rate: 0.0002
load_in_4bit: false
load_in_8bit: false
local_rank: null
logging_steps: 1
lora_alpha: 16
lora_dropout: 0.05
lora_fan_in_fan_out: null
lora_model_dir: null
lora_r: 8
lora_target_linear: true
lr_scheduler: cosine
max_steps: 1385
micro_batch_size: 2
mlflow_experiment_name: /tmp/b74a1932bd791c9f_train_data.json
model_type: AutoModelForCausalLM
num_epochs: 1
optimizer: adamw_bnb_8bit
output_dir: miner_id_24
pad_to_sequence_len: true
resume_from_checkpoint: null
s2_attention: null
sample_packing: false
save_only_model: false
save_safetensors: true
save_steps: 138
save_strategy: steps
save_total_limit: 4
sequence_len: 2048
special_tokens:
pad_token: <|end_of_text|>
strict: false
tf32: false
tokenizer_max_length: 2048
tokenizer_truncation: true
tokenizer_type: AutoTokenizer
train_on_inputs: false
trust_remote_code: true
val_set_size: 0.1
wandb_entity: null
wandb_mode: online
wandb_project: Gradients-On-Demand
wandb_run: 19bbda09-bbf4-406e-b7c3-46a03f755d97
wandb_runid: 19bbda09-bbf4-406e-b7c3-46a03f755d97
warmup_steps: 69
weight_decay: 0.01
xformers_attention: null
19bbda09-bbf4-406e-b7c3-46a03f755d97
This model is a fine-tuned version of tokyotech-llm/Llama-3-Swallow-8B-v0.1 on an unknown dataset. It achieves the following results on the evaluation set:
- Loss: 1.0083
- Memory/max Mem Active(gib): 22.23
- Memory/max Mem Allocated(gib): 22.23
- Memory/device Mem Reserved(gib): 23.39
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.0002
- train_batch_size: 2
- eval_batch_size: 2
- seed: 42
- distributed_type: multi-GPU
- num_devices: 8
- gradient_accumulation_steps: 4
- total_train_batch_size: 64
- total_eval_batch_size: 16
- optimizer: Use OptimizerNames.ADAMW_BNB with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: cosine
- lr_scheduler_warmup_steps: 69
- training_steps: 1385
Training results
| Training Loss | Epoch | Step | Validation Loss | Mem Active(gib) | Mem Allocated(gib) | Mem Reserved(gib) |
|---|---|---|---|---|---|---|
| No log | 0 | 0 | 1.6037 | 20.11 | 20.11 | 21.17 |
| 0.9294 | 0.1159 | 347 | 1.0630 | 22.23 | 22.23 | 23.04 |
| 1.0595 | 0.2318 | 694 | 1.0286 | 22.23 | 22.23 | 23.39 |
| 0.9556 | 0.3477 | 1041 | 1.0083 | 22.23 | 22.23 | 23.39 |
Framework versions
- PEFT 0.17.0
- Transformers 4.55.2
- Pytorch 2.7.1+cu126
- Datasets 4.0.0
- Tokenizers 0.21.4
- Downloads last month
- 1
Model tree for eason668/19bbda09-bbf4-406e-b7c3-46a03f755d97
Base model
tokyotech-llm/Llama-3-Swallow-8B-v0.1
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="eason668/19bbda09-bbf4-406e-b7c3-46a03f755d97") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)