Instructions to use joel-crasto/TEXT-01 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use joel-crasto/TEXT-01 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="joel-crasto/TEXT-01")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("joel-crasto/TEXT-01") model = AutoModelForCausalLM.from_pretrained("joel-crasto/TEXT-01", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use joel-crasto/TEXT-01 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "joel-crasto/TEXT-01" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "joel-crasto/TEXT-01", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/joel-crasto/TEXT-01
- SGLang
How to use joel-crasto/TEXT-01 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 "joel-crasto/TEXT-01" \ --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": "joel-crasto/TEXT-01", "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 "joel-crasto/TEXT-01" \ --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": "joel-crasto/TEXT-01", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use joel-crasto/TEXT-01 with Docker Model Runner:
docker model run hf.co/joel-crasto/TEXT-01
FACT-1
This model is based on the GPT-2 model shape, trained from scratch on the wikimedia/wikipedia dataset. It achieves the following results on the evaluation set:
- eval_loss: 2.0494
- eval_runtime: 443.6756
- eval_samples_per_second: 225.39
- eval_steps_per_second: 28.174
- epoch: 4.2665
- step: 60000
Model description
It is purely an experimental model for learning purposes, and due to the small dataset and train time, it may function as autocomplete with more tuning, but in its current state does not produce coherent sentences.
Intended uses & limitations
Not intended for use.
Sample prompt:
generator = pipeline("text-generation", model=model, tokenizer=tokenizer, device=0)
print(generator("Planes are designed",
max_length=100,
do_sample=True,
top_p=0.9,
temperature=0.8,
repetition_penalty=1.2,
no_repeat_ngram_size=2 ))
Sample response:
[{'generated_text': 'Planes are designed to to be\n1., for in-Aoonoono...'}]
Training and evaluation data
Subset of wikimedia/wikipedia dataset.
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 0.0003
- train_batch_size: 16
- eval_batch_size: 8
- seed: 42
- gradient_accumulation_steps: 4
- total_train_batch_size: 64
- optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: cosine
- lr_scheduler_warmup_steps: 1000
- training_steps: 100000
- mixed_precision_training: Native AMP
Framework versions
- Transformers 4.56.0
- Pytorch 2.5.1+cu121
- Datasets 4.0.0
- Tokenizers 0.22.0
- Downloads last month
- 7