Instructions to use Yashverms/gromo-llama2-faq-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Yashverms/gromo-llama2-faq-model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Yashverms/gromo-llama2-faq-model")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Yashverms/gromo-llama2-faq-model", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Yashverms/gromo-llama2-faq-model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Yashverms/gromo-llama2-faq-model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Yashverms/gromo-llama2-faq-model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Yashverms/gromo-llama2-faq-model
- SGLang
How to use Yashverms/gromo-llama2-faq-model 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 "Yashverms/gromo-llama2-faq-model" \ --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": "Yashverms/gromo-llama2-faq-model", "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 "Yashverms/gromo-llama2-faq-model" \ --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": "Yashverms/gromo-llama2-faq-model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Yashverms/gromo-llama2-faq-model with Docker Model Runner:
docker model run hf.co/Yashverms/gromo-llama2-faq-model
gromo-llama2-faq-model
This model is a fine-tuned version of meta-llama/Llama-2-7b-hf using LoRA (Low-Rank Adaptation) on a custom dataset (gromo-faq-v1-0.csv).
It achieves the following results on the evaluation set:
- Loss: 1.2682
- Perplexity: 3.55
Model description
This is a fine-tuned version of meta-llama/Llama-2-7b-hf using LoRA (Low-Rank Adaptation) on a custom dataset (gromo-faq-v1-0.csv). It is optimized for text generation tasks, particularly for FAQ-style responses, and achieves a loss of 1.2682 and a perplexity of 3.55 on the evaluation set.
Intended uses & limitations
- Intended uses: This model is intended for generating text based on FAQs or similar structured data. It is suitable for research, prototyping, or educational purposes.
- Limitations: The model may produce inaccurate or biased outputs due to the limited dataset it was trained on. It should not be used for production without further evaluation and fine-tuning.
Training and evaluation data
The model was trained on a custom dataset, gromo-faq-v1-0.csv, containing FAQ-style text data. Evaluation was performed on a separate validation subset of this dataset.
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 0.0002
- train_batch_size: 2
- eval_batch_size: 16
- seed: 42
- gradient_accumulation_steps: 2
- total_train_batch_size: 4
- optimizer: Use paged_adamw_8bit with betas=(0.9, 0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: linear
- num_epochs: 3
- mixed_precision_training: Native AMP
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 3.2528 | 1.0 | 172 | 1.5046 |
| 3.1911 | 2.0 | 344 | 1.4763 |
| 2.808 | 2.9854 | 513 | 1.4937 |
Note: The final evaluation after additional testing yielded a Validation Loss of 1.2682 and Perplexity of 3.55, reflecting improved performance.
Framework versions
- PEFT 0.14.0
- Transformers 4.47.0
- Pytorch 2.5.1+cu121
- Datasets 3.3.1
- Tokenizers 0.21.0
Model tree for Yashverms/gromo-llama2-faq-model
Base model
meta-llama/Llama-2-7b-hf