Text Generation
Transformers
PyTorch
TensorBoard
llama
Trained with AutoTrain
text-generation-inference
Run this model with HF Jobs
Run Mahmoud22/autotrainLLM2 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/Mahmoud22/autotrainLLM2. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Mahmoud22/autotrainLLM2 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/Mahmoud22/autotrainLLM2. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/Mahmoud22/autotrainLLM2. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use Mahmoud22/autotrainLLM2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Mahmoud22/autotrainLLM2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Mahmoud22/autotrainLLM2")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Mahmoud22/autotrainLLM2") model = AutoModelForCausalLM.from_pretrained("Mahmoud22/autotrainLLM2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Mahmoud22/autotrainLLM2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Mahmoud22/autotrainLLM2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Mahmoud22/autotrainLLM2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Mahmoud22/autotrainLLM2
- SGLang
How to use Mahmoud22/autotrainLLM2 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 "Mahmoud22/autotrainLLM2" \ --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": "Mahmoud22/autotrainLLM2", "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 "Mahmoud22/autotrainLLM2" \ --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": "Mahmoud22/autotrainLLM2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Mahmoud22/autotrainLLM2 with Docker Model Runner:
docker model run hf.co/Mahmoud22/autotrainLLM2
Upload folder using huggingface_hub
Browse filesFiles changed (24)
- README.mdAdded+9
- adapter_config.jsonAdded+21
- adapter_model.binAdded+3
- checkpoint-224/README.mdAdded+47
- checkpoint-224/adapter_config.jsonAdded+21
- checkpoint-224/adapter_model.binAdded+3
- checkpoint-224/optimizer.ptAdded+3
- checkpoint-224/pytorch_model.binAdded+3
- checkpoint-224/rng_state_0.pthAdded+3
- checkpoint-224/rng_state_1.pthAdded+3
- checkpoint-224/scheduler.ptAdded+3
- checkpoint-224/special_tokens_map.jsonAdded+6
- checkpoint-224/tokenizer.jsonAdded
- checkpoint-224/tokenizer.modelAdded+3
- checkpoint-224/tokenizer_config.jsonAdded+40
- checkpoint-224/trainer_state.jsonAdded+25
- checkpoint-224/training_args.binAdded+3
- runs/Sep21_01-35-32_14c0515f067d/events.out.tfevents.1695260135.14c0515f067d.656.0Added+3
- special_tokens_map.jsonAdded+6
- tokenizer.jsonAdded
- tokenizer.modelAdded+3
- tokenizer_config.jsonAdded+40
- training_args.binAdded+3
- training_params.jsonAdded+1
123456789---tags:- autotrain- text-generationwidget:- text: "I love AutoTrain because "---
# Model Trained Using AutoTrain123456789101112131415161718192021{ "auto_mapping": null, "base_model_name_or_path": "meta-llama/Llama-2-7b-chat-hf", "bias": "none", "fan_in_fan_out": false, "inference_mode": true, "init_lora_weights": true, "layers_pattern": null, "layers_to_transform": null, "lora_alpha": 32, "lora_dropout": 0.05, "modules_to_save": null, "peft_type": "LORA", "r": 16, "revision": null, "target_modules": [ "q_proj", "v_proj" ], "task_type": "CAUSAL_LM"}123version https://git-lfs.github.com/spec/v1oid sha256:f1e132534000a2a676d4f4e18f36ab9ee47233863a0fb95bcefd403c226c75ebsize 336004611234567891011121314151617181920212223242526272829303132333435363738394041424344454647---library_name: peft---## Training procedure
The following `bitsandbytes` quantization config was used during training:- quant_method: bitsandbytes- load_in_8bit: False- load_in_4bit: True- llm_int8_threshold: 6.0- llm_int8_skip_modules: None- llm_int8_enable_fp32_cpu_offload: False- llm_int8_has_fp16_weight: False- bnb_4bit_quant_type: nf4- bnb_4bit_use_double_quant: False- bnb_4bit_compute_dtype: float16
The following `bitsandbytes` quantization config was used during training:- quant_method: bitsandbytes- load_in_8bit: False- load_in_4bit: True- llm_int8_threshold: 6.0- llm_int8_skip_modules: None- llm_int8_enable_fp32_cpu_offload: False- llm_int8_has_fp16_weight: False- bnb_4bit_quant_type: nf4- bnb_4bit_use_double_quant: False- bnb_4bit_compute_dtype: float16
The following `bitsandbytes` quantization config was used during training:- quant_method: bitsandbytes- load_in_8bit: False- load_in_4bit: True- llm_int8_threshold: 6.0- llm_int8_skip_modules: None- llm_int8_enable_fp32_cpu_offload: False- llm_int8_has_fp16_weight: False- bnb_4bit_quant_type: nf4- bnb_4bit_use_double_quant: False- bnb_4bit_compute_dtype: float16### Framework versions
- PEFT 0.6.0.dev0- PEFT 0.6.0.dev0
- PEFT 0.6.0.dev0123456789101112131415161718192021{ "auto_mapping": null, "base_model_name_or_path": "meta-llama/Llama-2-7b-chat-hf", "bias": "none", "fan_in_fan_out": false, "inference_mode": true, "init_lora_weights": true, "layers_pattern": null, "layers_to_transform": null, "lora_alpha": 32, "lora_dropout": 0.05, "modules_to_save": null, "peft_type": "LORA", "r": 16, "revision": null, "target_modules": [ "q_proj", "v_proj" ], "task_type": "CAUSAL_LM"}123version https://git-lfs.github.com/spec/v1oid sha256:f1e132534000a2a676d4f4e18f36ab9ee47233863a0fb95bcefd403c226c75ebsize 33600461123version https://git-lfs.github.com/spec/v1oid sha256:0a8800b96d047c8456346f278b35d6074a8fa7e69d60dd1c34d4cde89fd9e5cbsize 67216581123version https://git-lfs.github.com/spec/v1oid sha256:c152074a486243089e4fc0fdee0a373a30fb0e0a6e40eb5fd0d36fdafc97a155size 443123version https://git-lfs.github.com/spec/v1oid sha256:1f7751b5122a2af97da634ef8b1470ca87626dd21c29d796a39ba9555cb58dcfsize 15607123version https://git-lfs.github.com/spec/v1oid sha256:f823e2d53ce359e2fd9fb92be50cd0fe70c3f414fedbc42555fa8f30485a4b82size 15607123version https://git-lfs.github.com/spec/v1oid sha256:487cb0ffa49efda5bca79e40fcfb5b812ea4dc489b50c5a488214b7d70284ca3size 627123456{ "bos_token": "<s>", "eos_token": "</s>", "pad_token": "</s>", "unk_token": "<unk>"}123version https://git-lfs.github.com/spec/v1oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347size 49972312345678910111213141516171819202122232425262728293031323334353637383940{ "added_tokens_decoder": { "0": { "content": "<unk>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "1": { "content": "<s>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "2": { "content": "</s>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true } }, "additional_special_tokens": [], "bos_token": "<s>", "clean_up_tokenization_spaces": false, "eos_token": "</s>", "legacy": false, "model_max_length": 1024, "pad_token": null, "padding_side": "right", "sp_model_kwargs": {}, "tokenizer_class": "LlamaTokenizer", "unk_token": "<unk>", "use_default_system_prompt": true}12345678910111213141516171819202122232425{ "best_metric": null, "best_model_checkpoint": null, "epoch": 1.991111111111111, "eval_steps": 500, "global_step": 224, "is_hyper_param_search": false, "is_local_process_zero": true, "is_world_process_zero": true, "log_history": [ { "epoch": 1.59, "learning_rate": 4.477611940298508e-05, "loss": 0.5296, "step": 179 } ], "logging_steps": 179, "max_steps": 224, "num_train_epochs": 2, "save_steps": 500, "total_flos": 2.91358117365547e+17, "trial_name": null, "trial_params": null}123version https://git-lfs.github.com/spec/v1oid sha256:1ebc4e4b4d916ceb12e499f862d0e0f45b5bf16e7e76663d8e9695725eb75318size 4027123version https://git-lfs.github.com/spec/v1oid sha256:693fbefec47dbdcff138857a7b7e672a4f8d0fcca61ecb12a4de61d2ee0aab62size 5012123456{ "bos_token": "<s>", "eos_token": "</s>", "pad_token": "</s>", "unk_token": "<unk>"}123version https://git-lfs.github.com/spec/v1oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347size 49972312345678910111213141516171819202122232425262728293031323334353637383940{ "added_tokens_decoder": { "0": { "content": "<unk>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "1": { "content": "<s>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "2": { "content": "</s>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true } }, "additional_special_tokens": [], "bos_token": "<s>", "clean_up_tokenization_spaces": false, "eos_token": "</s>", "legacy": false, "model_max_length": 1024, "pad_token": null, "padding_side": "right", "sp_model_kwargs": {}, "tokenizer_class": "LlamaTokenizer", "unk_token": "<unk>", "use_default_system_prompt": true}123version https://git-lfs.github.com/spec/v1oid sha256:1ebc4e4b4d916ceb12e499f862d0e0f45b5bf16e7e76663d8e9695725eb75318size 40271{"model": "meta-llama/Llama-2-7b-chat-hf", "data_path": "/kaggle/input/arabic-titles/", "project_name": "Another_tune", "train_split": "train", "valid_split": null, "text_column": "text", "lr": 0.0002, "epochs": 2, "batch_size": 4, "warmup_ratio": 0.1, "gradient_accumulation": 4, "optimizer": "adamw_torch", "scheduler": "linear", "weight_decay": 0.01, "max_grad_norm": 1.0, "seed": 42, "add_eos_token": false, "block_size": 1024, "use_peft": true, "lora_r": 16, "lora_alpha": 32, "lora_dropout": 0.05, "logging_steps": -1, "evaluation_strategy": "epoch", "save_total_limit": 1, "save_strategy": "epoch", "auto_find_batch_size": false, "fp16": true, "push_to_hub": true, "use_int8": false, "model_max_length": 1024, "repo_id": "Mahmoud22/autotrainLLM2", "use_int4": true, "trainer": "default", "target_modules": null, "merge_adapter": false, "username": null}README.mdAdded+9
adapter_config.jsonAdded+21
adapter_model.binAdded+3
checkpoint-224/README.mdAdded+47
checkpoint-224/adapter_config.jsonAdded+21
checkpoint-224/adapter_model.binAdded+3
checkpoint-224/optimizer.ptAdded+3
checkpoint-224/pytorch_model.binAdded+3
checkpoint-224/rng_state_0.pthAdded+3
checkpoint-224/rng_state_1.pthAdded+3
checkpoint-224/scheduler.ptAdded+3
checkpoint-224/special_tokens_map.jsonAdded+6
checkpoint-224/tokenizer.jsonAdded
checkpoint-224/tokenizer.modelAdded+3
checkpoint-224/tokenizer_config.jsonAdded+40
checkpoint-224/trainer_state.jsonAdded+25
checkpoint-224/training_args.binAdded+3
runs/Sep21_01-35-32_14c0515f067d/events.out.tfevents.1695260135.14c0515f067d.656.0Added+3
special_tokens_map.jsonAdded+6
tokenizer.jsonAdded
tokenizer.modelAdded+3
tokenizer_config.jsonAdded+40
training_args.binAdded+3
training_params.jsonAdded+1