Instructions to use vishals9711/vishals9711_ft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use vishals9711/vishals9711_ft with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="vishals9711/vishals9711_ft") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("vishals9711/vishals9711_ft", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use vishals9711/vishals9711_ft with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "vishals9711/vishals9711_ft" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "vishals9711/vishals9711_ft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/vishals9711/vishals9711_ft
- SGLang
How to use vishals9711/vishals9711_ft 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 "vishals9711/vishals9711_ft" \ --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": "vishals9711/vishals9711_ft", "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 "vishals9711/vishals9711_ft" \ --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": "vishals9711/vishals9711_ft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use vishals9711/vishals9711_ft with Docker Model Runner:
docker model run hf.co/vishals9711/vishals9711_ft
Configuration Parsing Warning:Invalid JSON for config file config.json
Great, thanks for sharing the code. Let's start filling in the model card template based on the details provided.
Model Card for vishals9711/vishals9711_ft
Model Details
Model Description
- Developed by: [Your Name or Team Name]
- Funded by [optional]: [More Information Needed]
- Shared by [optional]: [More Information Needed]
- Model type: Causal Language Model (Fine-tuned with LoRA)
- Language(s) (NLP): English (or other applicable languages)
- License: [License Type]
- Finetuned from model [optional]:
TheBloke/TinyLlama-1.1B-Chat-v1.0-GPTQ
Model Sources [optional]
- Repository: [Model Repository URL]
- Paper [optional]: [Link to any relevant paper]
- Demo [optional]: [Demo URL]
Uses
Direct Use
This model can be directly used for text generation tasks, including chatbot applications, headline generation, and similar tasks where causal language modeling is beneficial.
Downstream Use [optional]
The model can be further fine-tuned on specific datasets for tasks like sentiment analysis, summarization, etc.
Out-of-Scope Use
The model is not suitable for real-time applications without further optimization. It may also produce biased or harmful text if used without proper constraints and filtering.
Bias, Risks, and Limitations
This model, like all large language models, is subject to biases present in the training data. Users should be cautious when deploying this model in sensitive or high-stakes applications.
Recommendations
Users (both direct and downstream) should be made aware of the risks, biases, and limitations of the model. It is recommended to use safety mechanisms such as content filtering when deploying in production environments.
How to Get Started with the Model
from transformers import pipeline
from peft import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained('vishals9711/vishals9711_ft')
tokenizer = AutoTokenizer.from_pretrained('vishals9711/vishals9711_ft')
generator = pipeline('text-generation', model=model, tokenizer=tokenizer)
print(generator("Hello, how are you?", max_length=50))
Training Details
Training Data
The model was fine-tuned on the vishals9711/tiny_llama_headline dataset, which includes various headlines for training purposes. Preprocessing involved tokenization with truncation to a maximum length of 2048 tokens.
Training Procedure
- Preprocessing: The dataset was tokenized using
AutoTokenizerwith truncation on the left. - Training regime: The model was trained using 8-bit quantization, with gradient checkpointing enabled for memory efficiency. Training was performed using the LoRA technique with specific target modules for parameter-efficient tuning.
- Training Hyperparameters:
- Learning Rate: 2e-4
- Batch Size: 4
- Number of Epochs: 10
- Weight Decay: 0.01
- Gradient Accumulation Steps: 4
- Warmup Steps: 2
- Mixed Precision: FP16
Speeds, Sizes, Times [optional]
[More Information Needed]
Evaluation
Testing Data, Factors & Metrics
Testing Data
Evaluation was performed on a split of the vishals9711/tiny_llama_headline dataset.
Factors
[More Information Needed]
Metrics
Evaluation metrics included perplexity and loss on the evaluation dataset.
Results
[More Information Needed]
Environmental Impact
- Hardware Type: [More Information Needed]
- Hours used: [More Information Needed]
- Cloud Provider: [More Information Needed]
- Compute Region: [More Information Needed]
- Carbon Emitted: [More Information Needed]
Technical Specifications [optional]
Model Architecture and Objective
The model architecture is based on the TinyLlama variant, optimized with LoRA for efficient fine-tuning.
Compute Infrastructure
[More Information Needed]
Hardware
[More Information Needed]
Software
- Transformers library
- PEFT library for LoRA
- CUDA-enabled GPU for training
Citation [optional]
BibTeX:
[More Information Needed]
Feel free to provide more details or edit sections where necessary.
- Downloads last month
- 15
Model tree for vishals9711/vishals9711_ft
Base model
TinyLlama/TinyLlama-1.1B-Chat-v1.0