Text Generation
Transformers
Safetensors
mistral
Generated from Trainer
text-generation-inference
4-bit precision
bitsandbytes
Instructions to use OpenPipe/sample-lora-pii-redaction with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenPipe/sample-lora-pii-redaction with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="OpenPipe/sample-lora-pii-redaction")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("OpenPipe/sample-lora-pii-redaction") model = AutoModelForCausalLM.from_pretrained("OpenPipe/sample-lora-pii-redaction") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use OpenPipe/sample-lora-pii-redaction with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OpenPipe/sample-lora-pii-redaction" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OpenPipe/sample-lora-pii-redaction", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/OpenPipe/sample-lora-pii-redaction
- SGLang
How to use OpenPipe/sample-lora-pii-redaction 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 "OpenPipe/sample-lora-pii-redaction" \ --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": "OpenPipe/sample-lora-pii-redaction", "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 "OpenPipe/sample-lora-pii-redaction" \ --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": "OpenPipe/sample-lora-pii-redaction", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use OpenPipe/sample-lora-pii-redaction with Docker Model Runner:
docker model run hf.co/OpenPipe/sample-lora-pii-redaction
| license: apache-2.0 | |
| base_model: OpenPipe/mistral-ft-optimized-1218 | |
| tags: | |
| - generated_from_trainer | |
| model-index: | |
| - name: models/loras/OpenPipe/ft-development-0b0f52d6-bc53-4443-bbad-4a6103c95501-pii-7b-optimized | |
| results: [] | |
| <!-- This model card has been generated automatically according to the information the Trainer had access to. You | |
| should probably proofread and complete it, then remove this comment. --> | |
| [<img src="https://raw.githubusercontent.com/OpenAccess-AI-Collective/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/OpenAccess-AI-Collective/axolotl) | |
| # models/loras/OpenPipe/ft-development-0b0f52d6-bc53-4443-bbad-4a6103c95501-pii-7b-optimized | |
| This model is a fine-tuned version of [OpenPipe/mistral-ft-optimized-1218](https://huggingface.co/OpenPipe/mistral-ft-optimized-1218) on the None dataset. | |
| It achieves the following results on the evaluation set: | |
| - Loss: 0.0174 | |
| ## 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 | |
| - gradient_accumulation_steps: 4 | |
| - total_train_batch_size: 8 | |
| - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 | |
| - lr_scheduler_type: cosine | |
| - lr_scheduler_warmup_steps: 10 | |
| - num_epochs: 2 | |
| ### Training results | |
| | Training Loss | Epoch | Step | Validation Loss | | |
| |:-------------:|:-----:|:----:|:---------------:| | |
| | 0.42 | 0.02 | 1 | 0.3989 | | |
| | 0.0258 | 0.21 | 13 | 0.0304 | | |
| | 0.025 | 0.43 | 26 | 0.0220 | | |
| | 0.0146 | 0.64 | 39 | 0.0204 | | |
| | 0.0208 | 0.85 | 52 | 0.0196 | | |
| | 0.0136 | 1.07 | 65 | 0.0187 | | |
| | 0.0148 | 1.28 | 78 | 0.0181 | | |
| | 0.0178 | 1.49 | 91 | 0.0180 | | |
| | 0.0204 | 1.7 | 104 | 0.0175 | | |
| | 0.0128 | 1.92 | 117 | 0.0174 | | |
| ### Framework versions | |
| - Transformers 4.34.1 | |
| - Pytorch 2.0.1+cu117 | |
| - Datasets 2.14.6 | |
| - Tokenizers 0.14.1 | |