Instructions to use redactable-llm/redactable-dolphin-mixtral with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use redactable-llm/redactable-dolphin-mixtral with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="redactable-llm/redactable-dolphin-mixtral") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("redactable-llm/redactable-dolphin-mixtral") model = AutoModelForCausalLM.from_pretrained("redactable-llm/redactable-dolphin-mixtral", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use redactable-llm/redactable-dolphin-mixtral with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "redactable-llm/redactable-dolphin-mixtral" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "redactable-llm/redactable-dolphin-mixtral", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/redactable-llm/redactable-dolphin-mixtral
- SGLang
How to use redactable-llm/redactable-dolphin-mixtral 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 "redactable-llm/redactable-dolphin-mixtral" \ --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": "redactable-llm/redactable-dolphin-mixtral", "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 "redactable-llm/redactable-dolphin-mixtral" \ --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": "redactable-llm/redactable-dolphin-mixtral", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use redactable-llm/redactable-dolphin-mixtral with Docker Model Runner:
docker model run hf.co/redactable-llm/redactable-dolphin-mixtral
metadata
datasets:
- cognitivecomputations/dolphin
- cognitivecomputations/dolphin-coder
- Open-Orca/OpenOrca
language:
- en
library_name: transformers
tags:
- legal
Redactable-LLM
The high-level overview for integrating multiple Open Source Large Language Models within the AutoGen Framework is as follows:
Development of Custom Agents
- Agent Design: Tasks include NLP/NER/PII identification, interpreting natural language commands, executing document redaction, and final verification.
- Customization: Custom agents trained on specific tasks related to each aspect of the redaction process.
- Human Interaction: Implement features to facilitate seamless human-agent interaction, allowing users to input commands and queries naturally (Optional)
LLM & VLLM AutoGen Integration
- Model Selection: Automatic, task-dependent agent selection.
- Enhanced Inference: Enhanced LLM inference features for optimal performance, including tuning, caching, error handling, and templating.
- Quality Control: Vision agents analyze redacted documents using Set-of-Mark (SoM) prompting. Rejected documents are reprocessed and reviewed.

System Optimization
- Workflow Automation: Automate the redaction workflow using a blend of LLMs, custom agents, and human inputs for efficient detection and redaction of sensitive information.
- Performance Maximization: Optimize the system for both efficiency and accuracy, utilizing AutoGen's complex workflow management features.
User Interface Development
- Interface Design: Develop a user-friendly interface that enables non-technical users to interact with the system via natural language prompts.
- Feedback Integration: Implement a feedback loop to continuously refine the system's accuracy and user-friendliness based on user inputs.
- User Knowledgebase: (Optional) User account, profile, and domain knowledge will be accessible by the
Researchagent, for personalized interaction and results.
Training, Testing and Validation
- Model Training: Develop new datasets, focused on document understanding related to redaction.
- Unit Testing: Conduct extensive unit tests to ensure individual system components function correctly.
- System Testing: Perform comprehensive end-to-end testing to validate the entire redaction process, from user input to output.
- User Trials: Facilitate user trials to gather feedback and make necessary system adjustments.