Text Generation
PyTorch
GGUF
Hindi
English
foundational-model
scratch-training
llama-architecture
hinglish
ramayana
mahabharata
Instructions to use namanadep/foundational-llama-scratch-epic-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use namanadep/foundational-llama-scratch-epic-model with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf namanadep/foundational-llama-scratch-epic-model # Run inference directly in the terminal: llama cli -hf namanadep/foundational-llama-scratch-epic-model
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf namanadep/foundational-llama-scratch-epic-model # Run inference directly in the terminal: llama cli -hf namanadep/foundational-llama-scratch-epic-model
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf namanadep/foundational-llama-scratch-epic-model # Run inference directly in the terminal: ./llama-cli -hf namanadep/foundational-llama-scratch-epic-model
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf namanadep/foundational-llama-scratch-epic-model # Run inference directly in the terminal: ./build/bin/llama-cli -hf namanadep/foundational-llama-scratch-epic-model
Use Docker
docker model run hf.co/namanadep/foundational-llama-scratch-epic-model
- LM Studio
- Jan
- vLLM
How to use namanadep/foundational-llama-scratch-epic-model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "namanadep/foundational-llama-scratch-epic-model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "namanadep/foundational-llama-scratch-epic-model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/namanadep/foundational-llama-scratch-epic-model
- Ollama
How to use namanadep/foundational-llama-scratch-epic-model with Ollama:
ollama run hf.co/namanadep/foundational-llama-scratch-epic-model
- Unsloth Studio
How to use namanadep/foundational-llama-scratch-epic-model with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for namanadep/foundational-llama-scratch-epic-model to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for namanadep/foundational-llama-scratch-epic-model to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for namanadep/foundational-llama-scratch-epic-model to start chatting
- Docker Model Runner
How to use namanadep/foundational-llama-scratch-epic-model with Docker Model Runner:
docker model run hf.co/namanadep/foundational-llama-scratch-epic-model
- Lemonade
How to use namanadep/foundational-llama-scratch-epic-model with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull namanadep/foundational-llama-scratch-epic-model
Run and chat with the model
lemonade run user.foundational-llama-scratch-epic-model-{{QUANT_TAG}}List all available models
lemonade list
- Atomic Chat
| import os | |
| import json | |
| from tokenizers import Tokenizer, models, trainers, pre_tokenizers, decoders, processors | |
| def train_domain_tokenizer(input_text_path: str, output_dir: str, vocab_size: int = 32000): | |
| os.makedirs(output_dir, exist_ok=True) | |
| # Initialize Byte-Pair Encoding (BPE) Tokenizer | |
| tokenizer = Tokenizer(models.BPE(unk_token="<unk>")) | |
| tokenizer.pre_tokenizer = pre_tokenizers.ByteLevel(add_prefix_space=False) | |
| tokenizer.decoder = decoders.ByteLevel() | |
| trainer = trainers.BpeTrainer( | |
| vocab_size=vocab_size, | |
| special_tokens=["<unk>", "<s>", "</s>", "<pad>", "<mask>"], | |
| min_frequency=2 | |
| ) | |
| print(f"Training BPE Tokenizer on {input_text_path} (vocab_size={vocab_size})...") | |
| tokenizer.train(files=[input_text_path], trainer=trainer) | |
| tokenizer.post_processor = processors.ByteLevel(trim_offsets=False) | |
| tokenizer_path = os.path.join(output_dir, "tokenizer.json") | |
| tokenizer.save(tokenizer_path) | |
| print(f"Saved custom domain tokenizer to {tokenizer_path}") | |
| if __name__ == "__main__": | |
| sample_data_path = "/tmp/sample_domain_corpus.txt" | |
| if not os.path.exists(sample_data_path): | |
| with open(sample_data_path, "w") as f: | |
| f.write("SELECT * FROM users WHERE status = 'active';\n" * 100) | |
| train_domain_tokenizer(sample_data_path, "/home/adminuser/foundational_model/tokenizer", vocab_size=1000) | |