Text Generation
Transformers
Safetensors
English
mistral
text-generation-inference
trl
conversational
Instructions to use kevin009/minirewrite with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kevin009/minirewrite with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="kevin009/minirewrite") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("kevin009/minirewrite") model = AutoModelForCausalLM.from_pretrained("kevin009/minirewrite") 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
- vLLM
How to use kevin009/minirewrite with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kevin009/minirewrite" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kevin009/minirewrite", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/kevin009/minirewrite
- SGLang
How to use kevin009/minirewrite 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 "kevin009/minirewrite" \ --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": "kevin009/minirewrite", "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 "kevin009/minirewrite" \ --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": "kevin009/minirewrite", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use kevin009/minirewrite with Docker Model Runner:
docker model run hf.co/kevin009/minirewrite
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,22 +1,42 @@
|
|
| 1 |
---
|
| 2 |
-
base_model: unsloth/mistral-7b-instruct-v0.2-bnb-4bit
|
| 3 |
language:
|
| 4 |
- en
|
| 5 |
license: apache-2.0
|
| 6 |
tags:
|
| 7 |
- text-generation-inference
|
| 8 |
- transformers
|
| 9 |
-
- unsloth
|
| 10 |
- mistral
|
| 11 |
- trl
|
| 12 |
---
|
| 13 |
|
| 14 |
-
#
|
| 15 |
|
| 16 |
-
|
| 17 |
-
- **
|
| 18 |
-
- **
|
|
|
|
|
|
|
| 19 |
|
| 20 |
-
|
|
|
|
| 21 |
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
|
|
|
| 2 |
language:
|
| 3 |
- en
|
| 4 |
license: apache-2.0
|
| 5 |
tags:
|
| 6 |
- text-generation-inference
|
| 7 |
- transformers
|
|
|
|
| 8 |
- mistral
|
| 9 |
- trl
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# Model Card: Minimalist Assistant
|
| 13 |
|
| 14 |
+
## Model Details
|
| 15 |
+
- **Architecture**: 32k tokens, 32 layers
|
| 16 |
+
- **Quantization**: 4-bit
|
| 17 |
+
- **Base Model**: Mistral Instruct
|
| 18 |
+
- **Tokenizer**: Custom (based on Mistral Instruct)
|
| 19 |
|
| 20 |
+
## Intended Use
|
| 21 |
+
- As Editor Assistant for revision and paraphrasing
|
| 22 |
|
| 23 |
+
## Training Data
|
| 24 |
+
- **Initial Training**: 14,000 conversations in minimalist style to ensure concise output
|
| 25 |
+
- **Further Training**: 8,000 revision conversations to enhance rewriting and paraphrasing capabilities
|
| 26 |
+
|
| 27 |
+
## Performance and Limitations
|
| 28 |
+
- **Strengths**:
|
| 29 |
+
- Optimized for generating concise content
|
| 30 |
+
- Specialized in rewriting and paraphrasing tasks
|
| 31 |
+
- **Limitations**:
|
| 32 |
+
- May produce shorter outputs compared to standard models
|
| 33 |
+
- Potential biases from training data should be considered
|
| 34 |
+
|
| 35 |
+
## Ethical Considerations
|
| 36 |
+
- Designed for daily use, potential biases from training data should be considered
|
| 37 |
+
- Users should be aware of the model's focus on brevity and rewriting
|
| 38 |
+
|
| 39 |
+
## Additional Information
|
| 40 |
+
- Fine-tuned to address limitations in writing tasks observed in other models
|
| 41 |
+
- Personalized for everyday use cases
|
| 42 |
+
- Motivation for development was to create a model better suited for writing tasks, as existing models were found lacking in this area
|