Text Generation
Transformers
PyTorch
TensorBoard
Safetensors
English
Japanese
gpt_neox
text-generation-inference
Instructions to use thefrigidliquidation/pythia-1b-lightnovels with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use thefrigidliquidation/pythia-1b-lightnovels with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="thefrigidliquidation/pythia-1b-lightnovels")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("thefrigidliquidation/pythia-1b-lightnovels") model = AutoModelForCausalLM.from_pretrained("thefrigidliquidation/pythia-1b-lightnovels") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use thefrigidliquidation/pythia-1b-lightnovels with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "thefrigidliquidation/pythia-1b-lightnovels" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "thefrigidliquidation/pythia-1b-lightnovels", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/thefrigidliquidation/pythia-1b-lightnovels
- SGLang
How to use thefrigidliquidation/pythia-1b-lightnovels 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 "thefrigidliquidation/pythia-1b-lightnovels" \ --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": "thefrigidliquidation/pythia-1b-lightnovels", "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 "thefrigidliquidation/pythia-1b-lightnovels" \ --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": "thefrigidliquidation/pythia-1b-lightnovels", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use thefrigidliquidation/pythia-1b-lightnovels with Docker Model Runner:
docker model run hf.co/thefrigidliquidation/pythia-1b-lightnovels
Pythia 1B fine-tuned on Light Novels
This model was fine-tuned on light and web novels. This model was trained for translation, but can do generation too.
This model is a test of using monolingual data to improve translation as well as improving translation by adding similar sentence pairs to prompts.
English generation
To generate English text with this model, start your prompt with <|gen_en|>.
Japanese generation
To generate Japanese text with this model, start your prompt with <|gen_ja|>.
Japanese to English translation
To translate, format your prompt as such
<|tl_ja|>JAPANESE EXAMPLE SENTENCE 1<|tl_en|>ENGLISH EXAMPLE SENTENCE 1<|tl_end|>
<|tl_ja|>JAPANESE EXAMPLE SENTENCE 2<|tl_en|>ENGLISH EXAMPLE SENTENCE 2<|tl_end|>
<|tl_ja|>JAPANESE SENTENCE TO TRANSLATE<|tl_en|>
- Downloads last month
- 10