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 sys | |
| import torch | |
| import torch.nn.functional as F | |
| sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) | |
| from model.model import ModelConfig, Transformer | |
| def hinglish_interactive_chat(): | |
| device = "cuda" if torch.cuda.is_available() else "cpu" | |
| print("="*60) | |
| print(" Romanized Hindi (Hinglish) Foundational Model CLI") | |
| print("="*60) | |
| # Load 125M Model | |
| config = ModelConfig.get_125m(vocab_size=16384) | |
| model = Transformer(config).to(device) | |
| checkpoint_path = "/home/adminuser/foundational_model/checkpoints/model_125m_final.pt" | |
| if os.path.exists(checkpoint_path): | |
| model.load_state_dict(torch.load(checkpoint_path, map_location=device)) | |
| print(f"Loaded trained weights from {checkpoint_path}") | |
| else: | |
| print("Notice: No trained checkpoint found yet. Running in demo mode with randomly initialized model.") | |
| model.eval() | |
| print("\nType your prompt in Romanized Hindi (e.g., 'kya kar rahe ho?')") | |
| print("Type 'exit' to quit.\n") | |
| while True: | |
| try: | |
| prompt = input("User (Hinglish) > ") | |
| if prompt.strip().lower() == "exit": | |
| break | |
| if not prompt.strip(): | |
| continue | |
| # Tokenize & Generate | |
| print("Model (Hinglish) > ", end="", flush=True) | |
| # Dummy generation representation | |
| fake_response = "main ek foundational AI model hoon aur aapki madad karne ke liye taiyaar hoon!" | |
| print(fake_response + "\n") | |
| except KeyboardInterrupt: | |
| break | |
| if __name__ == "__main__": | |
| hinglish_interactive_chat() | |