Instructions to use TheOneWhoWill/Shibai-700M-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TheOneWhoWill/Shibai-700M-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TheOneWhoWill/Shibai-700M-Base")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("TheOneWhoWill/Shibai-700M-Base") model = AutoModelForCausalLM.from_pretrained("TheOneWhoWill/Shibai-700M-Base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TheOneWhoWill/Shibai-700M-Base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TheOneWhoWill/Shibai-700M-Base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TheOneWhoWill/Shibai-700M-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TheOneWhoWill/Shibai-700M-Base
- SGLang
How to use TheOneWhoWill/Shibai-700M-Base 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 "TheOneWhoWill/Shibai-700M-Base" \ --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": "TheOneWhoWill/Shibai-700M-Base", "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 "TheOneWhoWill/Shibai-700M-Base" \ --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": "TheOneWhoWill/Shibai-700M-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use TheOneWhoWill/Shibai-700M-Base with Docker Model Runner:
docker model run hf.co/TheOneWhoWill/Shibai-700M-Base
Shibai 700m Base
This is a 700m parameter LLaMA based model pre-trained with over 18 billion tokens of English text, Math, and Python code at a 2k native context length. It was trained in two stages, first to establish a strong foundational model that can comprehend and generate text, and then to improve its reasoning and coding capabilities with a continued pre-training stage. The use of RoPE scaling allows the model to extrapolate to longer context lengths with the same quality, up to 8k tokens, without any additional training. Although this model may be considered under-trained compared to models such as Qwen 3 0.6B or Qwen 3.5 0.8B, it is still capable of generating coherent and contextually relevant text across a wide range of topics. It should also be noted that this model was trained for 400 hours exclusively on a single RTX 5070 Ti GPU, which is a significant achievement in terms of resource efficiency.
Model Specs Overview
- Number of parameters: 678.4M
- Hidden size: 1280
- Number of layers: 28
- Number of attention heads: 16 (KV: 4)
- Intermediate size: 4480
- Sequence length: 2048
- RoPE Theta: 10,000
- Vocab size: 32,000
Getting Started
To use this model, you can load it with the Hugging Face Transformers library. To load the model you can use the following code snippet:
from transformers import AutoModelForCausalLM, AutoTokenizer
MODEL_ID = "TheOneWhoWill/Shibai-700M-Base"
processor = AutoTokenizer.from_pretrained(MODEL_ID)
model = AutoModelForCausalLM.from_pretrained(MODEL_ID, device_map="auto")
Then once the model is in memory you can start generating output with the following code snippet:
prompt = "Once upon a time"
inputs = processor(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=256,
do_sample=True,
temperature=0.3,
top_p=0.95,
top_k=50,
repetition_penalty=1.15,
no_repeat_ngram_size=3,
)
generated_text = processor.decode(outputs[0], skip_special_tokens=True)
print(generated_text)
Keep in mind that this model was pre-trained at a 2k context length and so you can't expect it to generate a stop token. This model works well for simple next-token prediction tasks but isn't fine tuned for instruction following or chat tasks. For those tasks I am planning on releasing a fine-tuned version of this model in the near future.
- Downloads last month
- 42