FlameF0X/arXiv-AI-ML
Viewer • Updated • 2.5k • 44
How to use FlameF0X/arXivGPT with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="FlameF0X/arXivGPT") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("FlameF0X/arXivGPT")
model = AutoModelForCausalLM.from_pretrained("FlameF0X/arXivGPT", device_map="auto")How to use FlameF0X/arXivGPT with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "FlameF0X/arXivGPT"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "FlameF0X/arXivGPT",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/FlameF0X/arXivGPT
How to use FlameF0X/arXivGPT with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "FlameF0X/arXivGPT" \
--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": "FlameF0X/arXivGPT",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "FlameF0X/arXivGPT" \
--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": "FlameF0X/arXivGPT",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use FlameF0X/arXivGPT with Docker Model Runner:
docker model run hf.co/FlameF0X/arXivGPT
A small GPT-2 language model trained from scratch with Auto-PreTrain.
It is a standard GPT2LMHeadModel, so no custom code or trust_remote_code is needed.
from transformers import pipeline
generator = pipeline("text-generation", model="FlameF0X/arXivGPT")
print(generator("Once upon a time", max_new_tokens=50)[0]["generated_text"])
| Parameters | 8,562,048 |
| Layers / heads / hidden | 8 / 8 / 128 |
| FFN size | 768 |
| Context length | 128 |
| Activation | gelu_new |
| Dropout | 0.1 |
| Tied embeddings | True |
| Tokenizer | gpt2 (vocab 50257) |
FlameF0X/arXiv-AI-ML, split train, first 100,000 rows.
4,682 train, 247 eval examples (~630,912 tokens), packed into full-length blocks.
| Epochs / steps | 5 / 2930 |
| Batch size (x accumulation) | 8 (x1) |
| Learning rate | 0.0005 (cosine, warmup 0.05) |
| Weight decay | 0.01 |
| Precision | fp32 |
| Seed | 42 |
| Device | CPU |
| Metric | Value |
|---|---|
| train_loss | 5.6627 |
| eval_loss | 5.1668 |
| perplexity | 175.36 |
Prompt: Once upon a time
Once upon a time-of-art dataset, allowing the target model's number of the proposed method with the model's training-to-step and a single-training framework for our method. AB-based approach is an multi-based approach that generates a comprehensive
This is a tiny model trained on a small data sample. Expect limited coherence and factual accuracy, and it may reproduce biases present in the training data. It is intended for experimentation and learning, not production use.