Text Generation
Transformers
PyTorch
Safetensors
index
Generated from Trainer
conversational
custom_code
Instructions to use IntervitensInc/Index-1.9b-glaive with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use IntervitensInc/Index-1.9b-glaive with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="IntervitensInc/Index-1.9b-glaive", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("IntervitensInc/Index-1.9b-glaive", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use IntervitensInc/Index-1.9b-glaive with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "IntervitensInc/Index-1.9b-glaive" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "IntervitensInc/Index-1.9b-glaive", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/IntervitensInc/Index-1.9b-glaive
- SGLang
How to use IntervitensInc/Index-1.9b-glaive 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 "IntervitensInc/Index-1.9b-glaive" \ --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": "IntervitensInc/Index-1.9b-glaive", "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 "IntervitensInc/Index-1.9b-glaive" \ --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": "IntervitensInc/Index-1.9b-glaive", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use IntervitensInc/Index-1.9b-glaive with Docker Model Runner:
docker model run hf.co/IntervitensInc/Index-1.9b-glaive
See axolotl config
axolotl version: 0.4.1
base_model: IndexTeam/Index-1.9B-Chat
model_type: IndexForCausalLM
tokenizer_type: AutoTokenizer
load_in_8bit: false
load_in_4bit: false
strict: false
datasets:
- path: gardner/glaive-function-calling-v2-sharegpt
type: sharegpt
conversation: index_chat
dataset_prepared_path: last_run_prepared
val_set_size: 0.05
output_dir: ./outputs/out
sequence_len: 4096
sample_packing: true
pad_to_sequence_len: true
trust_remote_code: true
wandb_project: index-1.9b
wandb_entity:
wandb_watch:
wandb_name: index-1.9b
wandb_log_model:
gradient_accumulation_steps: 8
micro_batch_size: 1
num_epochs: 4
optimizer: paged_adamw_8bit
lr_scheduler: cosine
learning_rate: 5e-6
train_on_inputs: false
group_by_length: false
bf16: auto
fp16:
tf32: false
gradient_checkpointing: true
gradient_checkpointing_kwargs:
use_reentrant: false
early_stopping_patience:
resume_from_checkpoint:
logging_steps: 1
xformers_attention:
flash_attention: true
warmup_steps: 100
evals_per_epoch: 2
eval_table_size:
saves_per_epoch: 2
debug:
deepspeed:
weight_decay: 0.0
fsdp:
fsdp_config:
special_tokens:
pad_token: </s>
outputs/out
This model is a fine-tuned version of IndexTeam/Index-1.9B-Chat on the None dataset. It achieves the following results on the evaluation set:
- Loss: 0.4745
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: 5e-06
- train_batch_size: 1
- eval_batch_size: 1
- seed: 42
- distributed_type: multi-GPU
- num_devices: 4
- gradient_accumulation_steps: 8
- total_train_batch_size: 32
- total_eval_batch_size: 4
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine
- lr_scheduler_warmup_steps: 100
- num_epochs: 4
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 5.3244 | 0.0021 | 1 | 5.2299 |
| 0.6569 | 0.4992 | 237 | 0.6106 |
| 0.5053 | 0.9984 | 474 | 0.5233 |
| 0.472 | 1.4779 | 711 | 0.5007 |
| 0.4849 | 1.9771 | 948 | 0.4863 |
| 0.4611 | 2.4576 | 1185 | 0.4794 |
| 0.3926 | 2.9568 | 1422 | 0.4756 |
| 0.4171 | 3.4368 | 1659 | 0.4747 |
| 0.4246 | 3.9360 | 1896 | 0.4745 |
Framework versions
- Transformers 4.42.3
- Pytorch 2.1.2+cu118
- Datasets 2.19.1
- Tokenizers 0.19.1
- Downloads last month
- 5
Model tree for IntervitensInc/Index-1.9b-glaive
Base model
IndexTeam/Index-1.9B-Chat