Text Generation
Transformers
PyTorch
Safetensors
English
gpt2
Trained with AutoTrain
text-generation-inference
Instructions to use CrabfishAI/NeXGen-small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CrabfishAI/NeXGen-small with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="CrabfishAI/NeXGen-small")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("CrabfishAI/NeXGen-small", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use CrabfishAI/NeXGen-small with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "CrabfishAI/NeXGen-small" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CrabfishAI/NeXGen-small", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/CrabfishAI/NeXGen-small
- SGLang
How to use CrabfishAI/NeXGen-small 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 "CrabfishAI/NeXGen-small" \ --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": "CrabfishAI/NeXGen-small", "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 "CrabfishAI/NeXGen-small" \ --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": "CrabfishAI/NeXGen-small", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use CrabfishAI/NeXGen-small with Docker Model Runner:
docker model run hf.co/CrabfishAI/NeXGen-small
Update README.md
Browse files
README.md
CHANGED
|
@@ -78,7 +78,24 @@ prompt = "Your prompt here"
|
|
| 78 |
generated_text = generate_text(prompt, max_length=200)
|
| 79 |
|
| 80 |
print("Generated Text:")
|
| 81 |
-
print(
|
|
|
|
| 82 |
|
|
|
|
| 83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
|
|
|
|
| 78 |
generated_text = generate_text(prompt, max_length=200)
|
| 79 |
|
| 80 |
print("Generated Text:")
|
| 81 |
+
print(generated_Text)
|
| 82 |
+
```
|
| 83 |
|
| 84 |
+
## Limitation
|
| 85 |
|
| 86 |
+
1. **Content Quality**: The model's output may vary in quality, and there's a possibility it might generate content that is nonsensical, irrelevant, or grammatically incorrect.
|
| 87 |
+
|
| 88 |
+
2. **Bias and Sensitivity**: The model is trained on diverse data, but it may inadvertently exhibit biases or generate content that is sensitive or inappropriate. Exercise caution and review generated text before use.
|
| 89 |
+
|
| 90 |
+
3. **Inappropriate Language**: The model might generate text that includes offensive language or inappropriate content. Be mindful of this, especially in applications where maintaining a respectful and inclusive tone is essential.
|
| 91 |
+
|
| 92 |
+
4. **Ambiguous Prompts**: The quality of generated text is highly dependent on the prompt provided. Ambiguous or unclear prompts may result in less coherent or relevant outputs.
|
| 93 |
+
|
| 94 |
+
## Disclaimer
|
| 95 |
+
|
| 96 |
+
- **Use with Caution**: This model is a tool that should be used with caution. Always review and validate the generated text before incorporating it into any application or publication.
|
| 97 |
+
|
| 98 |
+
- **Not for Critical Applications**: Avoid using the model for critical applications where accuracy and reliability are paramount. The model is intended for creative and exploratory purposes.
|
| 99 |
+
|
| 100 |
+
- **Ongoing Improvement**: The model may be updated or fine-tuned for better performance. Stay informed about updates and consider using the latest version for improved results.
|
| 101 |
|