Instructions to use core-outline/nyx-31M-it with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use core-outline/nyx-31M-it with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="core-outline/nyx-31M-it")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("core-outline/nyx-31M-it", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use core-outline/nyx-31M-it with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "core-outline/nyx-31M-it" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "core-outline/nyx-31M-it", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/core-outline/nyx-31M-it
- SGLang
How to use core-outline/nyx-31M-it 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 "core-outline/nyx-31M-it" \ --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": "core-outline/nyx-31M-it", "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 "core-outline/nyx-31M-it" \ --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": "core-outline/nyx-31M-it", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use core-outline/nyx-31M-it with Docker Model Runner:
docker model run hf.co/core-outline/nyx-31M-it
Nyx-31M-it Model
Nyx-31M-it is a Transformer-based model trained for text generation. It was fine-tuned using GPT-2 tokenization and optimized for domain-specific tasks.
Model Details
- Architecture: Decoder-only Transformer (GPT-2 style)
- Training Data: You can find the training data used here:
- Tokenizer: Based on GPT-2 (
tiktoken) - Framework: PyTorch
Usage
To use this model with Hugging Face's transformers library:
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "core-outline/nyx-31M-it"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)
input_text = "What is MRR?"
inputs = tokenizer(input_text, return_tensors="pt")
output = model.generate(**inputs)
decoded_text = tokenizer.decode(output[0], skip_special_tokens=True)
print(decoded_text)
Training
Optimizer: AdamW Learning Rate: 6e-5 Batch size: 32 Training steps: 12,000 Final validation loss: 0.04
- Downloads last month
- -