United 2nd
United 2nd is a custom autoregressive Transformer language model intended for text generation and multi-turn conversation. The project describes the model as trained from scratch and approximately 300M parameters. The exact parameter count and configuration should be confirmed against the released united_2nd_v1.pt checkpoint before publication.
This repository uses a custom PyTorch implementation. It is not currently a drop-in Transformers
AutoModelForCausalLMmodel. Use the providedmodeling_united_2nd.pyloader and tokenizer bundle.
Model details
| Field | Value |
|---|---|
| Model name | United 2nd |
| Release | v1 |
| Model type | Custom autoregressive Transformer |
| Training origin | Project-reported from scratch; training artifacts/logs not included in the reviewed inference package |
| Parameter count | Project-reported ~300M; exact count pending checkpoint inspection |
| Default layers | 18 |
| Default hidden size | 1,024 |
| Default FFN size | 2,816 |
| Default attention | GQA, 16 query heads and 4 KV heads |
| Position encoding | RoPE |
| Normalization | RMSNorm |
| Feed-forward | SwiGLU |
| Default context | 512 tokens |
| Tokenizer | Tokenizers JSON stored inside the model bundle |
| Primary declared language | English (project metadata); language-specific quality has not been independently evaluated |
| License | Apache-2.0 (subject to verification of all bundled assets and data rights) |
The checkpoint's config is authoritative. The architecture values above reflect the source-code defaults/project description and must be compared with the actual bundle before release.
Intended use
- Experimental text generation.
- General-purpose conversational prototypes.
- Research and evaluation of a compact, custom Transformer model.
- Local inference through the supplied Python pipeline or Gradio demo.
Out-of-scope use
Do not use this release as the sole decision-maker for medical, legal, financial, employment, education, security-critical, or other high-impact decisions. Do not assume that it can access live internet data, run code, or call external tools.
Files required for inference
The Hugging Face repository should include:
README.md
united_2nd_v1.pt
modeling_united_2nd.py
app.py
requirements.txt
assets/logo.png
LICENSE
SECURITY.md
SAFETY.md
united_2nd_v1.pt is expected to contain:
config: model configuration dictionary;model_state_dict: PyTorch model weights;tokenizer_json: serialized tokenizer JSON string.
Quick start
Download or clone the repository, install the dependencies, and launch the interface:
pip install -r requirements.txt
python app.py
The app expects united_2nd_v1.pt in the current working directory. The dependency declarations in requirements.txt are minimum versions, not a fully locked environment. Record the exact tested package versions for reproducible deployment.
Python inference
from modeling_united_2nd import load_united_2nd
pipe = load_united_2nd("united_2nd_v1.pt")
result = pipe.generate(
"Explain how HTTPS protects data in transit.",
history=[],
max_new_tokens=110,
temperature=0.15,
top_k=25,
)
print(result["reply"])
Conversation history is supplied as a list of (user_text, assistant_text) pairs:
history = [("What is a CPU?", "A CPU is the central processing unit of a computer.")]
result = pipe.generate("What does it do?", history=history)
The current default context is 512 tokens. Longer prompts/history are truncated to the most recent context window during model inference.
Generation behavior
max_new_tokens: maximum new tokens (default110).temperature: sampling temperature (default0.15); values at or below1e-5select greedily.top_k: top-k sampling cutoff (default25); values at or below zero disable top-k filtering.history: prior(user, assistant)pairs.
The pipeline stops generation when it encounters the configured end-of-sequence token or the user marker. The exact special-token IDs depend on the bundled tokenizer.
Capabilities and limitations
Present in the supplied inference implementation
- Causal next-token text generation.
- Multi-turn prompt assembly from user/assistant pairs.
- Temperature/top-k sampling and greedy generation.
- CPU/CUDA device selection.
- Gradio chat interface.
- Detection of the literal
<|call_coder|>marker.
Not present in the supplied inference implementation
- Live internet access or retrieval-augmented generation.
- External tools, browser access, or Python execution.
- Actual execution of a delegated tool call. The marker is only detected; no tool is invoked.
- A dedicated system-role input in the public
generate()method. - Runtime content moderation, a safety classifier, or a prompt-injection filter.
- Published benchmark scores or independently verified safety evaluations.
The project may have training-time objectives related to uncertainty and safety, but those properties are not established by the inference source code. Please consult SAFETY.md and evaluate the checkpoint independently.
Training and evaluation information
The current release materials do not provide enough evidence to document the training corpus, data licensing, data filtering, tokenizer-training corpus, total training tokens, optimizer, learning-rate schedule, hardware, training duration, random seed, or benchmark results. These fields should be added only when supported by actual training records.
No benchmark scores are claimed here. Please do not add leaderboard results or performance claims without a reproducible evaluation protocol and published results.
Safety, security, and privacy
- Model responses can be wrong or fabricated; verify important claims independently.
- Do not submit secrets, credentials, or confidential data to an unreviewed hosted demo.
- Do not expose
app.pydirectly to the public internet without authentication, rate limiting, request limits, and operational monitoring. - Only load checkpoint files from trusted sources. PyTorch checkpoint loading is a security-sensitive operation.
- The current inference source does not enforce a separate runtime safety policy.
- Report vulnerabilities privately at ttshavqatsiz@gmail.com.
See SAFETY.md and SECURITY.md in this repository.
License
Apache License 2.0. See LICENSE. The repository owner should separately verify the redistribution rights for the checkpoint, tokenizer assets, training data, and logo.
Creator
Rasuljanov Muhammadali
- LinkedIn: https://www.linkedin.com/in/rasuljanov-muhammadali-34b241404
- X: https://x.com/Happy__Lite
- Security contact: ttshavqatsiz@gmail.com